mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-11-11 12:57:10 +08:00
refactor: eslint src --fix
This commit is contained in:
@@ -22,16 +22,16 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
interface ImageType {
|
||||
src: string;
|
||||
title: string;
|
||||
link: string;
|
||||
src: string
|
||||
title: string
|
||||
link: string
|
||||
}
|
||||
|
||||
const imageList: ImageType[] = [
|
||||
{
|
||||
src: `https://doc.charles7c.top/img/sponsor/ad/roovps.jpg?${new Date().getTime()}`,
|
||||
title: 'ROOVPS',
|
||||
link: 'https://roovps.com/cart',
|
||||
},
|
||||
];
|
||||
link: 'https://roovps.com/cart'
|
||||
}
|
||||
]
|
||||
</script>
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
</script>
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.login-bg {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
>
|
||||
<h3 class="login-right__title">
|
||||
<img :src="appStore.getLogo()" alt="Logo" height="33" />
|
||||
<span>{{appStore.getTitle()}}</span>
|
||||
<span>{{ appStore.getTitle() }}</span>
|
||||
</h3>
|
||||
<a-form-item field="username">
|
||||
<a-input v-model="form.username" placeholder="请输入用户名" allow-clear>
|
||||
@@ -57,25 +57,24 @@
|
||||
<GiThemeBtn class="theme-btn"></GiThemeBtn>
|
||||
<LoginBg></LoginBg>
|
||||
|
||||
<!-- <div class="footer">
|
||||
<!-- <div class="footer">
|
||||
<div class="beian">
|
||||
<div class="below text" v-html="appStore.getCopyright()"></div>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { getImageCaptcha } from '@/apis'
|
||||
import { Message, type FormInstance } from '@arco-design/web-vue'
|
||||
import LoginBg from './components/LoginBg/index.vue'
|
||||
import {useAppStore, useUserStore} from '@/stores'
|
||||
import { useAppStore, useUserStore } from '@/stores'
|
||||
import { useStorage } from '@vueuse/core'
|
||||
import { useLoading } from '@/hooks'
|
||||
import { encryptByRsa } from '@/utils/encrypt'
|
||||
|
||||
const appStore = useAppStore();
|
||||
const appStore = useAppStore()
|
||||
|
||||
defineOptions({ name: 'Login' })
|
||||
|
||||
|
||||
@@ -77,7 +77,9 @@ const columns: TableInstance['columns'] = [
|
||||
value: '2'
|
||||
}
|
||||
],
|
||||
filter: () =>{return true},
|
||||
filter: () => {
|
||||
return true
|
||||
},
|
||||
alignLeft: true
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
<a-drawer v-model:visible="visible" title="日志详情" :width="720" :footer="false">
|
||||
<a-descriptions title="基本信息" :column="2" size="large" class="general-description">
|
||||
<a-descriptions-item label="日志 ID">{{ dataDetail?.id }}</a-descriptions-item>
|
||||
<a-descriptions-item label="Trace ID" >{{ dataDetail?.traceId }}<TextCopy :value="dataDetail?.traceId" /></a-descriptions-item>
|
||||
<a-descriptions-item label="Trace ID"
|
||||
>{{ dataDetail?.traceId }}<TextCopy :value="dataDetail?.traceId"
|
||||
/></a-descriptions-item>
|
||||
<a-descriptions-item label="操作人">{{ dataDetail?.createUserString }}</a-descriptions-item>
|
||||
<a-descriptions-item label="操作时间">{{ dataDetail?.createTime }}</a-descriptions-item>
|
||||
<a-descriptions-item label="操作内容">{{ dataDetail?.description }}</a-descriptions-item>
|
||||
@@ -16,12 +18,8 @@
|
||||
<a-tag v-else color="red">失败</a-tag>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="耗时">
|
||||
<a-tag v-if="dataDetail?.timeTaken > 500" color="red">
|
||||
{{ dataDetail?.timeTaken }}ms
|
||||
</a-tag>
|
||||
<a-tag v-else-if="dataDetail?.timeTaken > 200" color="orange">
|
||||
{{ dataDetail?.timeTaken }}ms
|
||||
</a-tag>
|
||||
<a-tag v-if="dataDetail?.timeTaken > 500" color="red"> {{ dataDetail?.timeTaken }}ms </a-tag>
|
||||
<a-tag v-else-if="dataDetail?.timeTaken > 200" color="orange"> {{ dataDetail?.timeTaken }}ms </a-tag>
|
||||
<a-tag v-else color="green">{{ dataDetail?.timeTaken }} ms</a-tag>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="请求 URI" :span="2">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<a-tab-pane key="2" title="操作日志" />
|
||||
</a-tabs>
|
||||
<keep-alive>
|
||||
<component :is="PaneMap[activeKey]" />
|
||||
<component :is="PaneMap[activeKey]" />
|
||||
</keep-alive>
|
||||
</a-card>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
</div>
|
||||
<div class="page"></div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@@ -10,7 +9,6 @@ defineOptions({ name: 'Notification' })
|
||||
|
||||
const route = useRoute()
|
||||
const form = reactive({ name: '' })
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -76,7 +76,6 @@ defineOptions({ name: 'Profile' })
|
||||
|
||||
const route = useRoute()
|
||||
const userStore = useUserStore()
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
</div>
|
||||
<div class="page"></div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@@ -10,7 +9,6 @@ defineOptions({ name: 'Security' })
|
||||
|
||||
const route = useRoute()
|
||||
const form = reactive({ name: '' })
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -6,32 +6,32 @@
|
||||
{{ siteFavicon?.name }}
|
||||
<template #extra>
|
||||
{{ siteFavicon?.description }}
|
||||
<br/>
|
||||
<br />
|
||||
<a-upload
|
||||
:file-list="faviconFile ? [faviconFile] : []"
|
||||
accept="image/*"
|
||||
:show-file-list="false"
|
||||
:custom-request="handleUploadFavicon"
|
||||
@change="handleChangeFavicon"
|
||||
:file-list="faviconFile ? [faviconFile] : []"
|
||||
accept="image/*"
|
||||
:show-file-list="false"
|
||||
:custom-request="handleUploadFavicon"
|
||||
@change="handleChangeFavicon"
|
||||
>
|
||||
<template #upload-button>
|
||||
<div
|
||||
:class="`arco-upload-list-item${
|
||||
:class="`arco-upload-list-item${
|
||||
faviconFile && faviconFile.status === 'error' ? ' arco-upload-list-item-error' : ''
|
||||
}`"
|
||||
>
|
||||
<div
|
||||
v-if="faviconFile && faviconFile.url"
|
||||
class="arco-upload-list-picture custom-upload-avatar favicon"
|
||||
v-if="faviconFile && faviconFile.url"
|
||||
class="arco-upload-list-picture custom-upload-avatar favicon"
|
||||
>
|
||||
<img :src="faviconFile.url" alt="favicon"/>
|
||||
<img :src="faviconFile.url" alt="favicon" />
|
||||
<div v-if="isEdit" class="arco-upload-list-picture-mask favicon">
|
||||
<IconEdit/>
|
||||
<IconEdit />
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="arco-upload-picture-card favicon">
|
||||
<div class="arco-upload-picture-card-text">
|
||||
<icon-upload/>
|
||||
<icon-upload />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -45,29 +45,29 @@
|
||||
{{ siteLogo?.name }}
|
||||
<template #extra>
|
||||
{{ siteLogo?.description }}
|
||||
<br/>
|
||||
<br />
|
||||
<a-upload
|
||||
:file-list="logoFile ? [logoFile] : []"
|
||||
accept="image/*"
|
||||
:show-file-list="false"
|
||||
:custom-request="handleUploadLogo"
|
||||
@change="handleChangeLogo"
|
||||
:file-list="logoFile ? [logoFile] : []"
|
||||
accept="image/*"
|
||||
:show-file-list="false"
|
||||
:custom-request="handleUploadLogo"
|
||||
@change="handleChangeLogo"
|
||||
>
|
||||
<template #upload-button>
|
||||
<div
|
||||
:class="`arco-upload-list-item${
|
||||
:class="`arco-upload-list-item${
|
||||
logoFile && logoFile.status === 'error' ? ' arco-upload-list-item-error' : ''
|
||||
}`"
|
||||
>
|
||||
<div v-if="logoFile && logoFile.url" class="arco-upload-list-picture custom-upload-avatar logo">
|
||||
<img :src="logoFile.url" alt="Logo"/>
|
||||
<img :src="logoFile.url" alt="Logo" />
|
||||
<div v-if="isEdit" class="arco-upload-list-picture-mask logo">
|
||||
<IconEdit/>
|
||||
<IconEdit />
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="arco-upload-picture-card logo">
|
||||
<div class="arco-upload-picture-card-text">
|
||||
<icon-upload/>
|
||||
<icon-upload />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -78,47 +78,47 @@
|
||||
</a-list-item>
|
||||
<a-list-item style="padding-top: 13px; border: none">
|
||||
<a-form-item class="input-item" :label="siteTitle?.name" field="site_title">
|
||||
<a-input v-model="form.site_title" placeholder="请输入网站标题" :max-length="18"/>
|
||||
<a-input v-model="form.site_title" placeholder="请输入网站标题" :max-length="18" />
|
||||
</a-form-item>
|
||||
<a-form-item class="input-item" :label="siteCopyright?.name" field="site_copyright" tooltip="支持HTML标签">
|
||||
<a-textarea
|
||||
v-model="form.site_copyright"
|
||||
placeholder="请输入版权信息"
|
||||
:auto-size="{
|
||||
v-model="form.site_copyright"
|
||||
placeholder="请输入版权信息"
|
||||
:auto-size="{
|
||||
minRows: 3
|
||||
}"
|
||||
show-word-limit
|
||||
show-word-limit
|
||||
/>
|
||||
</a-form-item>
|
||||
<div style="margin-top: 20px">
|
||||
<a-space>
|
||||
<a-button v-if="!isEdit" @click="toResetValue">
|
||||
<template #icon>
|
||||
<icon-undo/>
|
||||
<icon-undo />
|
||||
</template>
|
||||
恢复默认
|
||||
</a-button>
|
||||
<a-button v-if="!isEdit" type="primary" @click="toEdit">
|
||||
<template #icon>
|
||||
<icon-edit/>
|
||||
<icon-edit />
|
||||
</template>
|
||||
修改
|
||||
</a-button>
|
||||
<a-button v-if="isEdit" type="primary" @click="handleSave">
|
||||
<template #icon>
|
||||
<icon-save/>
|
||||
<icon-save />
|
||||
</template>
|
||||
保存
|
||||
</a-button>
|
||||
<a-button v-if="isEdit" @click="reset">
|
||||
<template #icon>
|
||||
<icon-refresh/>
|
||||
<icon-refresh />
|
||||
</template>
|
||||
重置
|
||||
</a-button>
|
||||
<a-button v-if="isEdit" @click="handleCancel">
|
||||
<template #icon>
|
||||
<icon-undo/>
|
||||
<icon-undo />
|
||||
</template>
|
||||
取消
|
||||
</a-button>
|
||||
@@ -130,17 +130,17 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type {OptionResp} from '@/apis'
|
||||
import {list, resetValue, save, uploadFile} from '@/apis'
|
||||
import {useAppStore} from '@/stores'
|
||||
import {type FileItem, type FormInstance, type RequestOption, Message, Modal} from '@arco-design/web-vue'
|
||||
import {useForm} from '@/hooks'
|
||||
import type { OptionResp } from '@/apis'
|
||||
import { list, resetValue, save, uploadFile } from '@/apis'
|
||||
import { useAppStore } from '@/stores'
|
||||
import { type FileItem, type FormInstance, type RequestOption, Message, Modal } from '@arco-design/web-vue'
|
||||
import { useForm } from '@/hooks'
|
||||
|
||||
const formRef = ref<FormInstance>()
|
||||
const dataList = ref<OptionResp[]>([])
|
||||
const isEdit = ref(false)
|
||||
const logoFile = ref<FileItem>({uid: '-1'})
|
||||
const faviconFile = ref<FileItem>({uid: '-2'})
|
||||
const logoFile = ref<FileItem>({ uid: '-1' })
|
||||
const faviconFile = ref<FileItem>({ uid: '-2' })
|
||||
const siteTitle = ref<OptionResp>()
|
||||
const siteCopyright = ref<OptionResp>()
|
||||
const siteLogo = ref<OptionResp>()
|
||||
@@ -148,11 +148,11 @@ const siteFavicon = ref<OptionResp>()
|
||||
const appStore = useAppStore()
|
||||
|
||||
const rules: FormInstance['rules'] = {
|
||||
site_title: [{required: true, message: '请输入系统标题'}],
|
||||
site_copyright: [{required: true, message: '请输入版权信息'}]
|
||||
site_title: [{ required: true, message: '请输入系统标题' }],
|
||||
site_copyright: [{ required: true, message: '请输入版权信息' }]
|
||||
}
|
||||
|
||||
const {form} = useForm({
|
||||
const { form } = useForm({
|
||||
site_title: '',
|
||||
site_copyright: '',
|
||||
site_logo: '',
|
||||
@@ -169,10 +169,10 @@ const query = reactive({
|
||||
* 重置表单
|
||||
*/
|
||||
const reset = () => {
|
||||
form.site_title=siteTitle.value?.value || '';
|
||||
form.site_copyright= siteCopyright.value?.value || '';
|
||||
form.site_logo= siteLogo.value?.value || '';
|
||||
form. site_favicon=siteFavicon.value?.value || ''
|
||||
form.site_title = siteTitle.value?.value || ''
|
||||
form.site_copyright = siteCopyright.value?.value || ''
|
||||
form.site_logo = siteLogo.value?.value || ''
|
||||
form.site_favicon = siteFavicon.value?.value || ''
|
||||
logoFile.value.url = siteLogo.value?.value
|
||||
faviconFile.value.url = siteFavicon.value?.value
|
||||
}
|
||||
@@ -226,21 +226,21 @@ const handleSave = () => {
|
||||
* @param options /
|
||||
*/
|
||||
const handleUploadLogo = (options: RequestOption) => {
|
||||
const controller = new AbortController();
|
||||
(async function requestWrap() {
|
||||
const {onProgress, onError, onSuccess, fileItem, name = 'file'} = options
|
||||
const controller = new AbortController()
|
||||
;(async function requestWrap() {
|
||||
const { onProgress, onError, onSuccess, fileItem, name = 'file' } = options
|
||||
onProgress(20)
|
||||
const formData = new FormData()
|
||||
formData.append(name as string, fileItem.file as Blob)
|
||||
uploadFile(formData)
|
||||
.then((res) => {
|
||||
onSuccess(res)
|
||||
form.site_logo = res.data.url
|
||||
Message.success(res.msg)
|
||||
})
|
||||
.catch((error) => {
|
||||
onError(error)
|
||||
})
|
||||
.then((res) => {
|
||||
onSuccess(res)
|
||||
form.site_logo = res.data.url
|
||||
Message.success(res.msg)
|
||||
})
|
||||
.catch((error) => {
|
||||
onError(error)
|
||||
})
|
||||
})()
|
||||
return {
|
||||
abort() {
|
||||
@@ -257,19 +257,19 @@ const handleUploadLogo = (options: RequestOption) => {
|
||||
const handleUploadFavicon = (options: RequestOption) => {
|
||||
const controller = new AbortController()
|
||||
;(async function requestWrap() {
|
||||
const {onProgress, onError, onSuccess, fileItem, name = 'file'} = options
|
||||
const { onProgress, onError, onSuccess, fileItem, name = 'file' } = options
|
||||
onProgress(20)
|
||||
const formData = new FormData()
|
||||
formData.append(name as string, fileItem.file as Blob)
|
||||
uploadFile(formData)
|
||||
.then((res) => {
|
||||
onSuccess(res)
|
||||
form.site_favicon = res.data.url
|
||||
Message.success(res.msg)
|
||||
})
|
||||
.catch((error) => {
|
||||
onError(error)
|
||||
})
|
||||
.then((res) => {
|
||||
onSuccess(res)
|
||||
form.site_favicon = res.data.url
|
||||
Message.success(res.msg)
|
||||
})
|
||||
.catch((error) => {
|
||||
onError(error)
|
||||
})
|
||||
})()
|
||||
return {
|
||||
abort() {
|
||||
|
||||
@@ -89,7 +89,7 @@ const { form, resetForm } = useForm<DeptReq>({
|
||||
name: '',
|
||||
parentId: undefined,
|
||||
sort: 999,
|
||||
status: 1,
|
||||
status: 1
|
||||
})
|
||||
|
||||
// 重置
|
||||
|
||||
@@ -147,7 +147,7 @@ const onDelete = async (item: DeptResp) => {
|
||||
}
|
||||
|
||||
// 导出
|
||||
const onExport = ()=>{
|
||||
const onExport = () => {
|
||||
useDownload(() => exportDept(queryForm))
|
||||
}
|
||||
|
||||
|
||||
@@ -55,12 +55,7 @@
|
||||
</template>
|
||||
</a-form-item>
|
||||
<a-form-item label="组件路径" field="component" v-if="form.type === 2">
|
||||
<a-input
|
||||
v-if="form.isExternal"
|
||||
v-model.trim="form.component"
|
||||
placeholder="请输入组件路径"
|
||||
allow-clear
|
||||
/>
|
||||
<a-input v-if="form.isExternal" v-model.trim="form.component" placeholder="请输入组件路径" allow-clear />
|
||||
<a-input v-else v-model.trim="form.component" placeholder="请输入组件路径" allow-clear>
|
||||
<template #prepend>@/views/</template>
|
||||
<template #append>.vue</template>
|
||||
@@ -241,7 +236,6 @@ const save = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'save-success'): void
|
||||
}>()
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
v-model:visible="visible"
|
||||
title="角色详情"
|
||||
:width="width >= 580 ? 580 : '100%'"
|
||||
:footer="false"
|
||||
>
|
||||
<a-drawer v-model:visible="visible" title="角色详情" :width="width >= 580 ? 580 : '100%'" :footer="false">
|
||||
<a-descriptions title="基础信息" :column="2" size="large" class="general-description">
|
||||
<a-descriptions-item label="ID" :span="2">{{ dataDetail?.id }}</a-descriptions-item>
|
||||
<a-descriptions-item label="名称">{{ dataDetail?.name }}</a-descriptions-item>
|
||||
@@ -22,7 +17,13 @@
|
||||
<a-descriptions-item label="修改时间">{{ dataDetail?.updateTime }}</a-descriptions-item>
|
||||
<a-descriptions-item label="描述" :span="2">{{ dataDetail?.description }}</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
<a-descriptions title="功能权限" :column="2" size="large" class="general-description" style="margin-top: 20px; position: relative">
|
||||
<a-descriptions
|
||||
title="功能权限"
|
||||
:column="2"
|
||||
size="large"
|
||||
class="general-description"
|
||||
style="margin-top: 20px; position: relative"
|
||||
>
|
||||
<a-descriptions-item :span="2">
|
||||
<a-tree
|
||||
ref="menuTreeRef"
|
||||
@@ -34,7 +35,14 @@
|
||||
/>
|
||||
</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
<a-descriptions v-if="dataDetail?.dataScope === 5" title="数据权限" :column="2" size="large" class="general-description" style="margin-top: 20px; position: relative">
|
||||
<a-descriptions
|
||||
v-if="dataDetail?.dataScope === 5"
|
||||
title="数据权限"
|
||||
:column="2"
|
||||
size="large"
|
||||
class="general-description"
|
||||
style="margin-top: 20px; position: relative"
|
||||
>
|
||||
<a-descriptions-item :span="2">
|
||||
<a-tree
|
||||
ref="deptTreeRef"
|
||||
|
||||
@@ -145,7 +145,6 @@ const RoleDetailDrawerRef = ref<InstanceType<typeof RoleDetailDrawer>>()
|
||||
const openDetail = (item: RoleResp) => {
|
||||
RoleDetailDrawerRef.value?.open(item.id)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
<script setup lang="ts">
|
||||
import { getStorage, addStorage, updateStorage } from '@/apis'
|
||||
import type { StorageReq } from './type'
|
||||
import { Message, type FormInstance } from "@arco-design/web-vue";
|
||||
import { Message, type FormInstance } from '@arco-design/web-vue'
|
||||
import { useForm } from '@/hooks'
|
||||
import { useDict } from '@/hooks/app'
|
||||
import { useWindowSize } from '@vueuse/core'
|
||||
|
||||
@@ -100,15 +100,11 @@ const title = computed(() => (isUpdate.value ? '修改用户' : '新增用户'))
|
||||
const formRef = ref<FormInstance>()
|
||||
|
||||
const rules: FormInstance['rules'] = {
|
||||
username: [
|
||||
{ required: true, message: '请输入用户名' },
|
||||
],
|
||||
nickname: [
|
||||
{ required: true, message: '请输入昵称' },
|
||||
],
|
||||
username: [{ required: true, message: '请输入用户名' }],
|
||||
nickname: [{ required: true, message: '请输入昵称' }],
|
||||
password: [{ required: true, message: '请输入密码' }],
|
||||
deptId: [{ required: true, message: '请选择所属部门' }],
|
||||
roleIds: [{ required: true, message: '请选择角色' }],
|
||||
roleIds: [{ required: true, message: '请选择角色' }]
|
||||
}
|
||||
|
||||
const { form, resetForm } = useForm({
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
v-model:visible="visible"
|
||||
title="用户详情"
|
||||
:width="width >= 580 ? 580 : '100%'"
|
||||
:footer="false"
|
||||
>
|
||||
<a-drawer v-model:visible="visible" title="用户详情" :width="width >= 580 ? 580 : '100%'" :footer="false">
|
||||
<a-descriptions :column="2" size="large" class="general-description">
|
||||
<a-descriptions-item label="ID" :span="2">{{ dataDetail?.id }}</a-descriptions-item>
|
||||
<a-descriptions-item label="用户名">{{ dataDetail?.username }}</a-descriptions-item>
|
||||
|
||||
@@ -30,7 +30,7 @@ const options: Options = {
|
||||
}
|
||||
|
||||
const columns: Columns = [
|
||||
{ label: '密码', field: 'newPassword', type: 'input-password', rules: [{ required: true, message: '请输入密码' }] },
|
||||
{ label: '密码', field: 'newPassword', type: 'input-password', rules: [{ required: true, message: '请输入密码' }] }
|
||||
]
|
||||
|
||||
const { form, resetForm } = useForm({
|
||||
@@ -56,7 +56,7 @@ const save = async () => {
|
||||
try {
|
||||
const isInvalid = await formRef.value?.formRef?.validate()
|
||||
if (isInvalid) return false
|
||||
await resetUserPwd({ newPassword: encryptByRsa(form.newPassword) || ''}, dataId.value)
|
||||
await resetUserPwd({ newPassword: encryptByRsa(form.newPassword) || '' }, dataId.value)
|
||||
Message.success('重置成功')
|
||||
emit('save-success')
|
||||
return true
|
||||
|
||||
@@ -6,14 +6,7 @@
|
||||
<a-input v-model="deptName" placeholder="请输入部门名称" allow-clear style="margin-bottom: 10px">
|
||||
<template #prefix><icon-search /></template>
|
||||
</a-input>
|
||||
<a-tree
|
||||
ref="treeRef"
|
||||
:data="deptList"
|
||||
default-expand-all
|
||||
show-line
|
||||
block-node
|
||||
@select="handleSelectDept"
|
||||
>
|
||||
<a-tree ref="treeRef" :data="deptList" default-expand-all show-line block-node @select="handleSelectDept">
|
||||
</a-tree>
|
||||
</a-col>
|
||||
|
||||
@@ -57,7 +50,12 @@
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<template #nickname="{ record }">
|
||||
<GiCellAvatar :avatar="getAvatar(record.avatar, record.gender)" :name="record.nickname" is-link @click="openDetail(record)" />
|
||||
<GiCellAvatar
|
||||
:avatar="getAvatar(record.avatar, record.gender)"
|
||||
:name="record.nickname"
|
||||
is-link
|
||||
@click="openDetail(record)"
|
||||
/>
|
||||
</template>
|
||||
<template #gender="{ record }">
|
||||
<GiCellGender :gender="record.gender" />
|
||||
@@ -178,7 +176,7 @@ const onDelete = (item: UserResp) => {
|
||||
}
|
||||
|
||||
// 导出
|
||||
const onExport = ()=>{
|
||||
const onExport = () => {
|
||||
useDownload(() => exportUser(queryForm))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user