优化若干功能
This commit is contained in:
parent
3832fdbe53
commit
12f45e31c6
@ -15,7 +15,6 @@ VITE_DROP_CONSOLE = true
|
|||||||
|
|
||||||
# 跨域代理,可以配置多个,请注意不要换行
|
# 跨域代理,可以配置多个,请注意不要换行
|
||||||
#VITE_PROXY = [["/appApi","http://localhost:8001"],["/upload","http://localhost:8001/upload"]]
|
#VITE_PROXY = [["/appApi","http://localhost:8001"],["/upload","http://localhost:8001/upload"]]
|
||||||
# VITE_PROXY=[["/api","https://naive-ui-admin"]]
|
|
||||||
VITE_PROXY=[["/api","http://192.168.124.203:8081/api"]]
|
VITE_PROXY=[["/api","http://192.168.124.203:8081/api"]]
|
||||||
|
|
||||||
# API 接口地址
|
# API 接口地址
|
||||||
|
@ -123,7 +123,6 @@
|
|||||||
"keywords": [
|
"keywords": [
|
||||||
"vue",
|
"vue",
|
||||||
"naive-ui",
|
"naive-ui",
|
||||||
"naive-ui-admin",
|
|
||||||
"vue3",
|
"vue3",
|
||||||
"ts",
|
"ts",
|
||||||
"tsx",
|
"tsx",
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
const cropper = ref<Nullable<Cropper>>();
|
const cropper = ref<Nullable<Cropper>>();
|
||||||
const isReady = ref(false);
|
const isReady = ref(false);
|
||||||
|
|
||||||
const prefixCls = 'naive-ui-admin';
|
const prefixCls = 'naive-ui';
|
||||||
const debounceRealTimeCroppered = useDebounceFn(realTimeCroppered, 80);
|
const debounceRealTimeCroppered = useDebounceFn(realTimeCroppered, 80);
|
||||||
|
|
||||||
const getImageStyle = computed((): CSSProperties => {
|
const getImageStyle = computed((): CSSProperties => {
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
<n-descriptions-item label="QQ交流群">
|
<n-descriptions-item label="QQ交流群">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<a href="https://www.baidu.com" class="py-2" target="_blank"
|
<a href="https://www.baidu.com" class="py-2" target="_blank"
|
||||||
>点击链接加入群聊【Naive Admin】</a
|
>点击链接加入群聊</a
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</n-descriptions-item>
|
</n-descriptions-item>
|
||||||
|
@ -76,7 +76,6 @@
|
|||||||
const editVisible = ref(false);
|
const editVisible = ref(false);
|
||||||
const adId = ref(0);
|
const adId = ref(0);
|
||||||
const rowKeys = ref([]);
|
const rowKeys = ref([]);
|
||||||
const showModal = ref(false);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义查询参数
|
* 定义查询参数
|
||||||
|
@ -60,6 +60,9 @@
|
|||||||
import { useMessage } from 'naive-ui';
|
import { useMessage } from 'naive-ui';
|
||||||
import { useModal } from '@/components/Modal';
|
import { useModal } from '@/components/Modal';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义参数
|
||||||
|
*/
|
||||||
const emit = defineEmits(['success', 'update:visible']);
|
const emit = defineEmits(['success', 'update:visible']);
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const message = useMessage();
|
const message = useMessage();
|
||||||
|
@ -76,7 +76,6 @@
|
|||||||
const editVisible = ref(false);
|
const editVisible = ref(false);
|
||||||
const adSortId = ref(0);
|
const adSortId = ref(0);
|
||||||
const rowKeys = ref([]);
|
const rowKeys = ref([]);
|
||||||
const showModal = ref(false);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义查询参数
|
* 定义查询参数
|
||||||
|
@ -130,11 +130,11 @@
|
|||||||
const editorRef = ref();
|
const editorRef = ref();
|
||||||
const categoryList = ref([]);
|
const categoryList = ref([]);
|
||||||
const fwbHeight = document.body.clientHeight - 180;
|
const fwbHeight = document.body.clientHeight - 180;
|
||||||
|
const message = useMessage();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义表单参数
|
* 定义表单参数
|
||||||
*/
|
*/
|
||||||
const message = useMessage();
|
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
id: '',
|
id: '',
|
||||||
categoryId: '',
|
categoryId: '',
|
||||||
|
@ -76,7 +76,6 @@
|
|||||||
const editVisible = ref(false);
|
const editVisible = ref(false);
|
||||||
const articleId = ref(0);
|
const articleId = ref(0);
|
||||||
const rowKeys = ref([]);
|
const rowKeys = ref([]);
|
||||||
const showModal = ref(false);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义查询参数
|
* 定义查询参数
|
||||||
|
@ -184,6 +184,11 @@
|
|||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
emit('update:visible', false);
|
emit('update:visible', false);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行更新
|
||||||
|
* @param show 参数
|
||||||
|
*/
|
||||||
const handleUpdate = (show) => {
|
const handleUpdate = (show) => {
|
||||||
if (!show) {
|
if (!show) {
|
||||||
handleClose();
|
handleClose();
|
||||||
|
@ -76,7 +76,6 @@
|
|||||||
const editVisible = ref(false);
|
const editVisible = ref(false);
|
||||||
const layoutId = ref(0);
|
const layoutId = ref(0);
|
||||||
const rowKeys = ref([]);
|
const rowKeys = ref([]);
|
||||||
const showModal = ref(false);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义查询参数
|
* 定义查询参数
|
||||||
|
@ -76,7 +76,6 @@
|
|||||||
const editVisible = ref(false);
|
const editVisible = ref(false);
|
||||||
const tagId = ref(0);
|
const tagId = ref(0);
|
||||||
const rowKeys = ref([]);
|
const rowKeys = ref([]);
|
||||||
const showModal = ref(false);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义查询参数
|
* 定义查询参数
|
||||||
|
@ -182,6 +182,10 @@
|
|||||||
lng: '',
|
lng: '',
|
||||||
lat: '',
|
lat: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义模态
|
||||||
|
*/
|
||||||
const [modalRegister, { openModal, setSubLoading }] = useModal({
|
const [modalRegister, { openModal, setSubLoading }] = useModal({
|
||||||
title: props.cityId ? '编辑' : '添加',
|
title: props.cityId ? '编辑' : '添加',
|
||||||
subBtuText: '确定',
|
subBtuText: '确定',
|
||||||
|
@ -66,6 +66,9 @@
|
|||||||
import { schemas } from './querySchemas';
|
import { schemas } from './querySchemas';
|
||||||
import { renderIcon } from '@/utils';
|
import { renderIcon } from '@/utils';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义参数
|
||||||
|
*/
|
||||||
const message = useMessage();
|
const message = useMessage();
|
||||||
const dialog = useDialog();
|
const dialog = useDialog();
|
||||||
const basicTableRef = ref();
|
const basicTableRef = ref();
|
||||||
|
@ -94,11 +94,11 @@
|
|||||||
|
|
||||||
const emit = defineEmits(['success', 'update:visible']);
|
const emit = defineEmits(['success', 'update:visible']);
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
|
const message = useMessage();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义表单参数
|
* 定义表单参数
|
||||||
*/
|
*/
|
||||||
const message = useMessage();
|
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
id: '',
|
id: '',
|
||||||
title: '',
|
title: '',
|
||||||
|
@ -69,13 +69,16 @@
|
|||||||
import { useModal } from '@/components/Modal';
|
import { useModal } from '@/components/Modal';
|
||||||
import UploadFile from '@/components/Upload/file.vue';
|
import UploadFile from '@/components/Upload/file.vue';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义参数
|
||||||
|
*/
|
||||||
const emit = defineEmits(['success', 'update:visible']);
|
const emit = defineEmits(['success', 'update:visible']);
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
|
const message = useMessage();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义表单参数
|
* 定义表单参数
|
||||||
*/
|
*/
|
||||||
const message = useMessage();
|
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
id: '',
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
|
@ -89,13 +89,16 @@
|
|||||||
import { useMessage } from 'naive-ui';
|
import { useMessage } from 'naive-ui';
|
||||||
import { useModal } from '@/components/Modal';
|
import { useModal } from '@/components/Modal';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义参数
|
||||||
|
*/
|
||||||
const emit = defineEmits(['success', 'update:visible']);
|
const emit = defineEmits(['success', 'update:visible']);
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
|
const message = useMessage();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义表单参数
|
* 定义表单参数
|
||||||
*/
|
*/
|
||||||
const message = useMessage();
|
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
id: '',
|
id: '',
|
||||||
title: '',
|
title: '',
|
||||||
|
@ -85,13 +85,16 @@
|
|||||||
import { useMessage } from 'naive-ui';
|
import { useMessage } from 'naive-ui';
|
||||||
import { useModal } from '@/components/Modal';
|
import { useModal } from '@/components/Modal';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义参数
|
||||||
|
*/
|
||||||
const emit = defineEmits(['success', 'update:visible']);
|
const emit = defineEmits(['success', 'update:visible']);
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
|
const message = useMessage();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义表单参数
|
* 定义表单参数
|
||||||
*/
|
*/
|
||||||
const message = useMessage();
|
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
id: '',
|
id: '',
|
||||||
title: '',
|
title: '',
|
||||||
|
@ -70,6 +70,9 @@
|
|||||||
import { schemas } from './querySchemas';
|
import { schemas } from './querySchemas';
|
||||||
import { renderIcon } from '@/utils';
|
import { renderIcon } from '@/utils';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义参数
|
||||||
|
*/
|
||||||
const message = useMessage();
|
const message = useMessage();
|
||||||
const dialog = useDialog();
|
const dialog = useDialog();
|
||||||
const basicTableRef = ref();
|
const basicTableRef = ref();
|
||||||
@ -77,7 +80,6 @@
|
|||||||
const editVisible = ref(false);
|
const editVisible = ref(false);
|
||||||
const smsId = ref(0);
|
const smsId = ref(0);
|
||||||
const rowKeys = ref([]);
|
const rowKeys = ref([]);
|
||||||
const showModal = ref(false);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义查询参数
|
* 定义查询参数
|
||||||
|
@ -67,7 +67,6 @@
|
|||||||
const editVisible = ref(false);
|
const editVisible = ref(false);
|
||||||
const emailLogId = ref(0);
|
const emailLogId = ref(0);
|
||||||
const rowKeys = ref([]);
|
const rowKeys = ref([]);
|
||||||
const showModal = ref(false);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义查询参数
|
* 定义查询参数
|
||||||
|
@ -67,7 +67,6 @@
|
|||||||
const editVisible = ref(false);
|
const editVisible = ref(false);
|
||||||
const fileLogId = ref(0);
|
const fileLogId = ref(0);
|
||||||
const rowKeys = ref([]);
|
const rowKeys = ref([]);
|
||||||
const showModal = ref(false);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义查询参数
|
* 定义查询参数
|
||||||
|
@ -67,7 +67,6 @@
|
|||||||
const editVisible = ref(false);
|
const editVisible = ref(false);
|
||||||
const smsLogId = ref(0);
|
const smsLogId = ref(0);
|
||||||
const rowKeys = ref([]);
|
const rowKeys = ref([]);
|
||||||
const showModal = ref(false);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义查询参数
|
* 定义查询参数
|
||||||
|
@ -61,29 +61,39 @@
|
|||||||
key: string;
|
key: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义参数
|
||||||
|
*/
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const message = useMessage();
|
const message = useMessage();
|
||||||
const codeMsg: any = ref('获取验证码');
|
const codeMsg: any = ref('获取验证码');
|
||||||
const isGetCode = ref(false);
|
const isGetCode = ref(false);
|
||||||
const autoLogin = ref(true);
|
|
||||||
const LOGIN_NAME = PageEnum.BASE_LOGIN_NAME;
|
const LOGIN_NAME = PageEnum.BASE_LOGIN_NAME;
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义表单参数
|
||||||
|
*/
|
||||||
const formInline = reactive({
|
const formInline = reactive({
|
||||||
mobile: '',
|
mobile: '',
|
||||||
code: '',
|
code: '',
|
||||||
key: '',
|
key: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义验证规则
|
||||||
|
*/
|
||||||
const rules: FormRules = {
|
const rules: FormRules = {
|
||||||
mobile: { key: 'a', required: true, message: '请输入手机号码', trigger: 'blur' },
|
mobile: { key: 'a', required: true, message: '请输入手机号码', trigger: 'blur' },
|
||||||
code: { required: true, message: '请输入验证码', trigger: 'blur' },
|
code: { required: true, message: '请输入验证码', trigger: 'blur' },
|
||||||
};
|
};
|
||||||
const userStore = useUserStore();
|
|
||||||
|
|
||||||
const router = useRouter();
|
/**
|
||||||
const route = useRoute();
|
* 获取验证码
|
||||||
|
*/
|
||||||
function getCode() {
|
function getCode() {
|
||||||
if (!formInline.mobile) {
|
if (!formInline.mobile) {
|
||||||
formRef.value?.validate(
|
formRef.value?.validate(
|
||||||
@ -105,6 +115,10 @@
|
|||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行提交表单
|
||||||
|
*/
|
||||||
const handleSubmit = () => {
|
const handleSubmit = () => {
|
||||||
if (!formRef.value) return;
|
if (!formRef.value) return;
|
||||||
formRef.value.validate(async (valid) => {
|
formRef.value.validate(async (valid) => {
|
||||||
@ -146,7 +160,6 @@
|
|||||||
formInline.key = key;
|
formInline.key = key;
|
||||||
captchaImg.value = captcha;
|
captchaImg.value = captcha;
|
||||||
};
|
};
|
||||||
|
|
||||||
getCaptcha();
|
getCaptcha();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -92,6 +92,9 @@
|
|||||||
LockOutlined,
|
LockOutlined,
|
||||||
} from '@vicons/antd';
|
} from '@vicons/antd';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义参数
|
||||||
|
*/
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const message = useMessage();
|
const message = useMessage();
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
@ -100,6 +103,9 @@
|
|||||||
|
|
||||||
const emit = defineEmits(['backLogin']);
|
const emit = defineEmits(['backLogin']);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义表单参数
|
||||||
|
*/
|
||||||
const formInline = reactive({
|
const formInline = reactive({
|
||||||
username: '',
|
username: '',
|
||||||
password: '',
|
password: '',
|
||||||
@ -109,6 +115,11 @@
|
|||||||
agreement: false,
|
agreement: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证码手机号
|
||||||
|
* @param _rule 规则
|
||||||
|
* @param value 参数值
|
||||||
|
*/
|
||||||
const validatePhone = async (_rule, value: string) => {
|
const validatePhone = async (_rule, value: string) => {
|
||||||
var isPhone = /^1(3\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\d|9[0-35-9])\d{8}$/;
|
var isPhone = /^1(3\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\d|9[0-35-9])\d{8}$/;
|
||||||
if (!value) {
|
if (!value) {
|
||||||
@ -119,6 +130,10 @@
|
|||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自定义验证规则
|
||||||
|
*/
|
||||||
const rules = {
|
const rules = {
|
||||||
username: { required: true, message: '请输入用户名', trigger: 'blur' },
|
username: { required: true, message: '请输入用户名', trigger: 'blur' },
|
||||||
mobile: [{ key: 'a', required: true, validator: validatePhone, trigger: 'blur' }],
|
mobile: [{ key: 'a', required: true, validator: validatePhone, trigger: 'blur' }],
|
||||||
@ -139,6 +154,9 @@
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行提交表单
|
||||||
|
*/
|
||||||
const handleSubmit = () => {
|
const handleSubmit = () => {
|
||||||
formRef.value
|
formRef.value
|
||||||
.validate()
|
.validate()
|
||||||
@ -152,10 +170,16 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回登录
|
||||||
|
*/
|
||||||
const backLogin = () => {
|
const backLogin = () => {
|
||||||
emit('backLogin', true);
|
emit('backLogin', true);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取验证码
|
||||||
|
*/
|
||||||
function getCode() {
|
function getCode() {
|
||||||
if (!formInline.mobile) {
|
if (!formInline.mobile) {
|
||||||
formRef.value?.validate(
|
formRef.value?.validate(
|
||||||
|
@ -1,155 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="account-root">
|
|
||||||
<div class="account-root-item">
|
|
||||||
<transition name="fade-bottom" appear mode="out-in">
|
|
||||||
<div class="account-root-item-img">
|
|
||||||
<img src="~@/assets/images/login-bg.svg" alt="" />
|
|
||||||
</div>
|
|
||||||
</transition>
|
|
||||||
</div>
|
|
||||||
<div class="account-root-item root-right-item">
|
|
||||||
<transition name="fade-bottom" appear mode="out-in">
|
|
||||||
<div class="account-form">
|
|
||||||
<div class="account-top">
|
|
||||||
<div class="account-top-logo">
|
|
||||||
<img src="~@/assets/images/account-logo.png" alt="" />
|
|
||||||
</div>
|
|
||||||
<div class="account-top-desc">Naive Ui Admin中台前端/设计解决方案</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<n-tabs v-model:value="tab" size="large" justify-content="space-evenly">
|
|
||||||
<n-tab-pane name="login" tab="登录">
|
|
||||||
<transition name="fade-bottom" appear mode="out-in">
|
|
||||||
<LoginForm ref="LoginFormRef" @goRegister="changeGoRegister" />
|
|
||||||
</transition>
|
|
||||||
</n-tab-pane>
|
|
||||||
<n-tab-pane name="register" tab="注册">
|
|
||||||
<transition name="fade-bottom" appear mode="out-in">
|
|
||||||
<RegisterForm ref="RegisterFormRef" @backLogin="changeBackLogin" />
|
|
||||||
</transition>
|
|
||||||
</n-tab-pane>
|
|
||||||
</n-tabs>
|
|
||||||
</div>
|
|
||||||
</transition>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import LoginForm from './LoginForm.vue';
|
|
||||||
import RegisterForm from './RegisterForm.vue';
|
|
||||||
|
|
||||||
const tab = ref('login');
|
|
||||||
|
|
||||||
function changeBackLogin() {
|
|
||||||
tab.value = 'login';
|
|
||||||
}
|
|
||||||
|
|
||||||
function changeGoRegister() {
|
|
||||||
tab.value = 'register';
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.account-root {
|
|
||||||
box-sizing: border-box;
|
|
||||||
display: flex;
|
|
||||||
flex-flow: row wrap;
|
|
||||||
width: 100%;
|
|
||||||
height: 100vh;
|
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
&-item {
|
|
||||||
box-sizing: border-box;
|
|
||||||
margin: 0px;
|
|
||||||
flex-direction: row;
|
|
||||||
flex-basis: 100%;
|
|
||||||
flex-grow: 0;
|
|
||||||
max-width: 100%;
|
|
||||||
background: #2d8cf0;
|
|
||||||
|
|
||||||
&-img {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
img {
|
|
||||||
width: 70%;
|
|
||||||
display: inline-block;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.root-right-item {
|
|
||||||
background: #fff;
|
|
||||||
box-sizing: border-box;
|
|
||||||
flex-flow: row wrap;
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.account-form {
|
|
||||||
flex-basis: 45%;
|
|
||||||
flex-grow: 0;
|
|
||||||
max-width: 45%;
|
|
||||||
|
|
||||||
.account-top {
|
|
||||||
text-align: center;
|
|
||||||
margin: 20px 0;
|
|
||||||
|
|
||||||
&-logo {
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
img {
|
|
||||||
width: 100%;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&-desc {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #808695;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 600px) {
|
|
||||||
&-item {
|
|
||||||
flex-basis: 100%;
|
|
||||||
flex-grow: 0;
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 320px) {
|
|
||||||
.root-right-item {
|
|
||||||
.account-form {
|
|
||||||
flex-basis: 60%;
|
|
||||||
flex-grow: 0;
|
|
||||||
max-width: 60%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 1200px) {
|
|
||||||
&-item {
|
|
||||||
flex-basis: 50%;
|
|
||||||
flex-grow: 0;
|
|
||||||
max-width: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.root-right-item {
|
|
||||||
.account-form {
|
|
||||||
flex-basis: 45%;
|
|
||||||
flex-grow: 0;
|
|
||||||
max-width: 45%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -11,8 +11,7 @@
|
|||||||
:row-key="(row) => row.cacheName"
|
:row-key="(row) => row.cacheName"
|
||||||
:checked-row-keys="cacheName"
|
:checked-row-keys="cacheName"
|
||||||
@update:checked-row-keys="handleNameChange"
|
@update:checked-row-keys="handleNameChange"
|
||||||
>
|
/>
|
||||||
</n-data-table>
|
|
||||||
</n-card>
|
</n-card>
|
||||||
<n-card title="键名列表">
|
<n-card title="键名列表">
|
||||||
<n-data-table
|
<n-data-table
|
||||||
|
@ -93,6 +93,9 @@
|
|||||||
import { useMessage } from 'naive-ui';
|
import { useMessage } from 'naive-ui';
|
||||||
import { useModal } from '@/components/Modal';
|
import { useModal } from '@/components/Modal';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义参数
|
||||||
|
*/
|
||||||
const emit = defineEmits(['success', 'update:visible']);
|
const emit = defineEmits(['success', 'update:visible']);
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const message = useMessage();
|
const message = useMessage();
|
||||||
|
@ -130,6 +130,9 @@
|
|||||||
import { useMessage } from 'naive-ui';
|
import { useMessage } from 'naive-ui';
|
||||||
import { useModal } from '@/components/Modal';
|
import { useModal } from '@/components/Modal';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义参数
|
||||||
|
*/
|
||||||
const emit = defineEmits(['success', 'update:visible']);
|
const emit = defineEmits(['success', 'update:visible']);
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const message = useMessage();
|
const message = useMessage();
|
||||||
|
@ -31,6 +31,10 @@
|
|||||||
import { getOnlineList, onlineOut } from '@/api/monitor/online';
|
import { getOnlineList, onlineOut } from '@/api/monitor/online';
|
||||||
import { useMessage, useDialog } from 'naive-ui';
|
import { useMessage, useDialog } from 'naive-ui';
|
||||||
import { TableAction } from '@/components/Table';
|
import { TableAction } from '@/components/Table';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义参数
|
||||||
|
*/
|
||||||
const onlineTableData = ref([]);
|
const onlineTableData = ref([]);
|
||||||
const message = useMessage();
|
const message = useMessage();
|
||||||
const dialog = useDialog();
|
const dialog = useDialog();
|
||||||
@ -136,7 +140,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 注册
|
* 执行注册
|
||||||
*/
|
*/
|
||||||
const [register, {}] = useForm({
|
const [register, {}] = useForm({
|
||||||
gridProps: { cols: '1 s:1 m:2 l:3 xl:4 2xl:4' },
|
gridProps: { cols: '1 s:1 m:2 l:3 xl:4 2xl:4' },
|
||||||
|
@ -48,8 +48,7 @@
|
|||||||
v-model:value="formData[item.code]"
|
v-model:value="formData[item.code]"
|
||||||
:multiple="item.type == 'selects' ? true : false"
|
:multiple="item.type == 'selects' ? true : false"
|
||||||
:options="item.param"
|
:options="item.param"
|
||||||
>
|
/>
|
||||||
</n-select>
|
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="item.type == 'date' || item.type == 'datetime'">
|
<template v-else-if="item.type == 'date' || item.type == 'datetime'">
|
||||||
<n-date-picker
|
<n-date-picker
|
||||||
|
@ -24,6 +24,10 @@
|
|||||||
import { getWebInfo } from '@/api/setting/web';
|
import { getWebInfo } from '@/api/setting/web';
|
||||||
import { PageWrapper } from '@/components/Page';
|
import { PageWrapper } from '@/components/Page';
|
||||||
import BasicSetting from './BasicSetting.vue';
|
import BasicSetting from './BasicSetting.vue';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义参数
|
||||||
|
*/
|
||||||
const activeName = ref();
|
const activeName = ref();
|
||||||
const tabData = ref([]);
|
const tabData = ref([]);
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
>
|
>
|
||||||
<n-input v-model:value="formData.realname" placeholder="请输入名称" clearable />
|
<n-input v-model:value="formData.realname" placeholder="请输入名称" clearable />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
|
|
||||||
<n-form-item label="性别" path="sex" class="flex-1">
|
<n-form-item label="性别" path="sex" class="flex-1">
|
||||||
<n-radio-group v-model:value="formData.gender" name="gender">
|
<n-radio-group v-model:value="formData.gender" name="gender">
|
||||||
<n-radio :value="1">男</n-radio>
|
<n-radio :value="1">男</n-radio>
|
||||||
@ -107,8 +106,12 @@
|
|||||||
import { getUserInfo } from '@/api/system/user';
|
import { getUserInfo } from '@/api/system/user';
|
||||||
import { updateProfile } from '@/api/setting/profile';
|
import { updateProfile } from '@/api/setting/profile';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义参数
|
||||||
|
*/
|
||||||
const formRef: any = ref(null);
|
const formRef: any = ref(null);
|
||||||
const message = useMessage();
|
const message = useMessage();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义表单参数
|
* 定义表单参数
|
||||||
*/
|
*/
|
||||||
@ -146,6 +149,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 钩子函数
|
* 钩子函数
|
||||||
*/
|
*/
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { PageWrapper } from '@/components/Page';
|
import { PageWrapper } from '@/components/Page';
|
||||||
import BasicSetting from './BasicSetting.vue';
|
import BasicSetting from './BasicSetting.vue';
|
||||||
import SafetySetting from './SafetySetting.vue';
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.thing-cell {
|
.thing-cell {
|
||||||
|
@ -40,6 +40,9 @@
|
|||||||
import { useMessage } from 'naive-ui';
|
import { useMessage } from 'naive-ui';
|
||||||
import { useModal } from '@/components/Modal';
|
import { useModal } from '@/components/Modal';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义参数
|
||||||
|
*/
|
||||||
const emit = defineEmits(['success', 'update:visible']);
|
const emit = defineEmits(['success', 'update:visible']);
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
|
|
||||||
|
@ -96,6 +96,9 @@
|
|||||||
import { schemas } from './querySchemas';
|
import { schemas } from './querySchemas';
|
||||||
import { renderIcon } from '@/utils';
|
import { renderIcon } from '@/utils';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义参数
|
||||||
|
*/
|
||||||
const message = useMessage();
|
const message = useMessage();
|
||||||
const dialog = useDialog();
|
const dialog = useDialog();
|
||||||
const basicTableRef = ref();
|
const basicTableRef = ref();
|
||||||
@ -105,7 +108,6 @@
|
|||||||
const rowKeys = ref([]);
|
const rowKeys = ref([]);
|
||||||
const importVisible = ref(false);
|
const importVisible = ref(false);
|
||||||
const exportLoading = ref(false);
|
const exportLoading = ref(false);
|
||||||
const showModal = ref(false);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义查询参数
|
* 定义查询参数
|
||||||
|
@ -129,6 +129,16 @@
|
|||||||
import { useModal } from '@/components/Modal';
|
import { useModal } from '@/components/Modal';
|
||||||
import { renderIcon } from '@/utils';
|
import { renderIcon } from '@/utils';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义参数
|
||||||
|
*/
|
||||||
|
const message = useMessage();
|
||||||
|
const emit = defineEmits(['success', 'update:visible']);
|
||||||
|
const formRef = ref();
|
||||||
|
const dataSource = ref([]);
|
||||||
|
const componentsOptions = ref(getModulesKey());
|
||||||
|
const menuOptions = ref<any[]>([]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义接收的参数
|
* 定义接收的参数
|
||||||
*/
|
*/
|
||||||
@ -152,12 +162,6 @@
|
|||||||
subBtuText: '确定',
|
subBtuText: '确定',
|
||||||
width: 600,
|
width: 600,
|
||||||
});
|
});
|
||||||
const message = useMessage();
|
|
||||||
const emit = defineEmits(['success', 'update:visible']);
|
|
||||||
const formRef = ref();
|
|
||||||
const dataSource = ref([]);
|
|
||||||
|
|
||||||
const componentsOptions = ref(getModulesKey());
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义表单参数
|
* 定义表单参数
|
||||||
@ -187,8 +191,6 @@
|
|||||||
status: 0,
|
status: 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
const menuOptions = ref<any[]>([]);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义Icon组件
|
* 定义Icon组件
|
||||||
* @param icon 图标
|
* @param icon 图标
|
||||||
|
@ -40,6 +40,9 @@
|
|||||||
import { useMessage } from 'naive-ui';
|
import { useMessage } from 'naive-ui';
|
||||||
import { useModal } from '@/components/Modal';
|
import { useModal } from '@/components/Modal';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义参数
|
||||||
|
*/
|
||||||
const emit = defineEmits(['success', 'update:visible']);
|
const emit = defineEmits(['success', 'update:visible']);
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
|
|
||||||
|
@ -66,6 +66,9 @@
|
|||||||
import { schemas } from './querySchemas';
|
import { schemas } from './querySchemas';
|
||||||
import { renderIcon } from '@/utils';
|
import { renderIcon } from '@/utils';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义参数
|
||||||
|
*/
|
||||||
const message = useMessage();
|
const message = useMessage();
|
||||||
const dialog = useDialog();
|
const dialog = useDialog();
|
||||||
const basicTableRef = ref();
|
const basicTableRef = ref();
|
||||||
@ -73,7 +76,6 @@
|
|||||||
const editVisible = ref(false);
|
const editVisible = ref(false);
|
||||||
const positionId = ref(0);
|
const positionId = ref(0);
|
||||||
const rowKeys = ref([]);
|
const rowKeys = ref([]);
|
||||||
const showModal = ref(false);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义查询参数
|
* 定义查询参数
|
||||||
|
@ -49,6 +49,9 @@
|
|||||||
import { useMessage } from 'naive-ui';
|
import { useMessage } from 'naive-ui';
|
||||||
import { useModal } from '@/components/Modal';
|
import { useModal } from '@/components/Modal';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义参数
|
||||||
|
*/
|
||||||
const emit = defineEmits(['success', 'update:visible']);
|
const emit = defineEmits(['success', 'update:visible']);
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
|
|
||||||
|
@ -76,6 +76,9 @@
|
|||||||
import { schemas } from './querySchemas';
|
import { schemas } from './querySchemas';
|
||||||
import { renderIcon } from '@/utils';
|
import { renderIcon } from '@/utils';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义参数
|
||||||
|
*/
|
||||||
const message = useMessage();
|
const message = useMessage();
|
||||||
const dialog = useDialog();
|
const dialog = useDialog();
|
||||||
const basicTableRef = ref();
|
const basicTableRef = ref();
|
||||||
@ -85,7 +88,6 @@
|
|||||||
const authVisible = ref(false);
|
const authVisible = ref(false);
|
||||||
const roleId = ref(0);
|
const roleId = ref(0);
|
||||||
const rowKeys = ref([]);
|
const rowKeys = ref([]);
|
||||||
const showModal = ref(false);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义查询参数
|
* 定义查询参数
|
||||||
|
@ -71,6 +71,9 @@
|
|||||||
import { schemas } from './querySchemas';
|
import { schemas } from './querySchemas';
|
||||||
import { renderIcon } from '@/utils';
|
import { renderIcon } from '@/utils';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义参数
|
||||||
|
*/
|
||||||
const message = useMessage();
|
const message = useMessage();
|
||||||
const dialog = useDialog();
|
const dialog = useDialog();
|
||||||
const basicTableRef = ref();
|
const basicTableRef = ref();
|
||||||
@ -78,7 +81,6 @@
|
|||||||
const editVisible = ref(false);
|
const editVisible = ref(false);
|
||||||
const tenantId = ref(0);
|
const tenantId = ref(0);
|
||||||
const rowKeys = ref([]);
|
const rowKeys = ref([]);
|
||||||
const showModal = ref(false);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义查询参数
|
* 定义查询参数
|
||||||
@ -211,6 +213,7 @@
|
|||||||
await nextTick();
|
await nextTick();
|
||||||
createModalRef.value.openModal();
|
createModalRef.value.openModal();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 执行添加账号
|
* 执行添加账号
|
||||||
* @param recored 参数
|
* @param recored 参数
|
||||||
@ -219,6 +222,7 @@
|
|||||||
await tenantAccount({ tenantId: recored.id });
|
await tenantAccount({ tenantId: recored.id });
|
||||||
message.success('创建成功');
|
message.success('创建成功');
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 执行删除
|
* 执行删除
|
||||||
* @param id 参数
|
* @param id 参数
|
||||||
|
@ -264,6 +264,17 @@
|
|||||||
import { useUserStore } from '@/store/modules/user';
|
import { useUserStore } from '@/store/modules/user';
|
||||||
import { useModal } from '@/components/Modal';
|
import { useModal } from '@/components/Modal';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义参数
|
||||||
|
*/
|
||||||
|
const cropperCircled = ref();
|
||||||
|
const emit = defineEmits(['success', 'update:visible']);
|
||||||
|
const message = useMessage();
|
||||||
|
const formRef = ref();
|
||||||
|
const uploadHeaders = reactive({
|
||||||
|
authorization: useUserStore().getToken,
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义接收的参数
|
* 定义接收的参数
|
||||||
*/
|
*/
|
||||||
@ -275,11 +286,6 @@
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
|
||||||
* 定义参数变量
|
|
||||||
*/
|
|
||||||
const emit = defineEmits(['success', 'update:visible']);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义模态
|
* 定义模态
|
||||||
*/
|
*/
|
||||||
@ -289,12 +295,6 @@
|
|||||||
width: 800,
|
width: 800,
|
||||||
});
|
});
|
||||||
|
|
||||||
const message = useMessage();
|
|
||||||
const uploadHeaders = reactive({
|
|
||||||
authorization: useUserStore().getToken,
|
|
||||||
});
|
|
||||||
const formRef = ref();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义接收的参数
|
* 定义接收的参数
|
||||||
*/
|
*/
|
||||||
@ -320,14 +320,6 @@
|
|||||||
password: '',
|
password: '',
|
||||||
passwordConfirm: '',
|
passwordConfirm: '',
|
||||||
});
|
});
|
||||||
const cropperCircled = ref();
|
|
||||||
const passwordConfirmValidator = (rule: object, value: string, callback: any) => {
|
|
||||||
if (formData.password) {
|
|
||||||
if (!value) callback(new Error('请再次输入密码'));
|
|
||||||
if (value !== formData.password) callback(new Error('两次输入密码不一致!'));
|
|
||||||
}
|
|
||||||
callback();
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传成功回调
|
* 上传成功回调
|
||||||
|
@ -107,6 +107,9 @@
|
|||||||
import { renderIcon } from '@/utils';
|
import { renderIcon } from '@/utils';
|
||||||
import printJS from 'print-js';
|
import printJS from 'print-js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义参数
|
||||||
|
*/
|
||||||
const message = useMessage();
|
const message = useMessage();
|
||||||
const dialog = useDialog();
|
const dialog = useDialog();
|
||||||
const basicTableRef = ref();
|
const basicTableRef = ref();
|
||||||
@ -116,7 +119,6 @@
|
|||||||
const rowKeys = ref([]);
|
const rowKeys = ref([]);
|
||||||
const importVisible = ref(false);
|
const importVisible = ref(false);
|
||||||
const exportLoading = ref(false);
|
const exportLoading = ref(false);
|
||||||
const showModal = ref(false);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义查询参数
|
* 定义查询参数
|
||||||
|
@ -50,6 +50,9 @@
|
|||||||
import { PlusOutlined, SnippetsOutlined } from '@vicons/antd';
|
import { PlusOutlined, SnippetsOutlined } from '@vicons/antd';
|
||||||
import { renderIcon } from '@/utils';
|
import { renderIcon } from '@/utils';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义参数
|
||||||
|
*/
|
||||||
const message = useMessage();
|
const message = useMessage();
|
||||||
const dialog = useDialog();
|
const dialog = useDialog();
|
||||||
const basicTableRef = ref();
|
const basicTableRef = ref();
|
||||||
|
Loading…
Reference in New Issue
Block a user