Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
This commit is contained in:
@@ -2,13 +2,15 @@ run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- prod
|
||||
jobs:
|
||||
Explore-Gitea-Actions:
|
||||
runs-on: ubuntu
|
||||
steps:
|
||||
- name: 拉取代码仓库
|
||||
uses: http://git.missmoc.top/mocheng/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1 # 只拉取最新的1个提交(浅克隆)
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: http://git.missmoc.top/mocheng/setup-node@v3
|
||||
|
@@ -35,6 +35,7 @@ export interface Resident_unitVO {
|
||||
* 入驻位置
|
||||
*/
|
||||
location: string;
|
||||
locations: string[];
|
||||
|
||||
/**
|
||||
* 入驻时间
|
||||
|
@@ -84,13 +84,13 @@ const menus = computed(() => {
|
||||
// icon: CircleHelp,
|
||||
// text: $t('ui.widgets.qa'),
|
||||
// },
|
||||
{
|
||||
handler: () => {
|
||||
router.push('/navigation');
|
||||
},
|
||||
// icon: TagOutlined,
|
||||
text: '返回导航',
|
||||
},
|
||||
// {
|
||||
// handler: () => {
|
||||
// router.push('/navigation');
|
||||
// },
|
||||
// // icon: TagOutlined,
|
||||
// text: '返回导航',
|
||||
// },
|
||||
];
|
||||
/**
|
||||
* 租户选中状态 不显示个人中心
|
||||
|
@@ -56,9 +56,7 @@ export const useAuthStore = defineStore('auth', () => {
|
||||
if (accessStore.loginExpired) {
|
||||
accessStore.setLoginExpired(false);
|
||||
} else {
|
||||
onSuccess
|
||||
? await onSuccess?.()
|
||||
: await router.push('/navigation');
|
||||
onSuccess ? await onSuccess?.() : await router.push('/analytics');
|
||||
}
|
||||
|
||||
if (userInfo?.realName) {
|
||||
|
@@ -26,7 +26,7 @@ onMounted(() => {
|
||||
{ name: '搜索引擎', value: 1048 },
|
||||
{ name: '直接访问', value: 735 },
|
||||
{ name: '邮件营销', value: 580 },
|
||||
{ name: '联盟广告', value: 484 },
|
||||
// { name: '联盟广告', value: 484 },
|
||||
],
|
||||
emphasis: {
|
||||
label: {
|
||||
|
@@ -25,29 +25,29 @@ const overviewItems: AnalysisOverviewItem[] = [
|
||||
icon: SvgCardIcon,
|
||||
title: '用户量',
|
||||
totalTitle: '总用户量',
|
||||
totalValue: 120_000,
|
||||
value: 2000,
|
||||
totalValue: 78,
|
||||
value: 15,
|
||||
},
|
||||
{
|
||||
icon: SvgCakeIcon,
|
||||
title: '访问量',
|
||||
totalTitle: '总访问量',
|
||||
totalValue: 500_000,
|
||||
value: 20_000,
|
||||
totalValue: 2_278,
|
||||
value: 461,
|
||||
},
|
||||
{
|
||||
icon: SvgDownloadIcon,
|
||||
title: '下载量',
|
||||
totalTitle: '总下载量',
|
||||
totalValue: 120_000,
|
||||
value: 8000,
|
||||
totalValue: 17,
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
icon: SvgBellIcon,
|
||||
title: '使用量',
|
||||
totalTitle: '总使用量',
|
||||
totalValue: 50_000,
|
||||
value: 5000,
|
||||
totalValue: 6_652,
|
||||
value: 3_739,
|
||||
},
|
||||
];
|
||||
|
||||
|
@@ -2,8 +2,6 @@ import type {FormSchemaGetter} from '#/adapter/form';
|
||||
import type {VxeGridProps} from '#/adapter/vxe-table';
|
||||
import {renderDict} from "#/utils/render";
|
||||
import {getDictOptions} from "#/utils/dict";
|
||||
import {h} from "vue";
|
||||
import {Rate} from "ant-design-vue";
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
@@ -96,34 +94,34 @@ export const columns: VxeGridProps['columns'] = [
|
||||
// field: 'planCompleTime',
|
||||
// width: 100,
|
||||
// },
|
||||
{
|
||||
title: '完成时间',
|
||||
field: 'compleTime',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '评价',
|
||||
field: 'serviceEvalua',
|
||||
width: 180,
|
||||
slots: {
|
||||
default: ({row}) => {
|
||||
return h(Rate, {
|
||||
value: row.serviceEvalua || 0,
|
||||
disabled: true,
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '是否超时',
|
||||
field: 'isTimeOut',
|
||||
width: 100,
|
||||
slots: {
|
||||
default: ({row}) => {
|
||||
return row.isTimeOut ? renderDict(row.isTimeOut, 'wy_sf') : '';
|
||||
},
|
||||
},
|
||||
},
|
||||
// {
|
||||
// title: '完成时间',
|
||||
// field: 'compleTime',
|
||||
// width: 100,
|
||||
// },
|
||||
// {
|
||||
// title: '评价',
|
||||
// field: 'serviceEvalua',
|
||||
// width: 180,
|
||||
// slots: {
|
||||
// default: ({row}) => {
|
||||
// return h(Rate, {
|
||||
// value: row.serviceEvalua || 0,
|
||||
// disabled: true,
|
||||
// });
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// title: '是否超时',
|
||||
// field: 'isTimeOut',
|
||||
// width: 100,
|
||||
// slots: {
|
||||
// default: ({row}) => {
|
||||
// return row.isTimeOut ? renderDict(row.isTimeOut, 'wy_sf') : '';
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
{
|
||||
title: '创建时间',
|
||||
field: 'createTime',
|
||||
|
@@ -47,7 +47,7 @@ async function handleOpenChange(open: boolean) {
|
||||
try {
|
||||
if (orderDetail.value.orderImgUrl) {
|
||||
const res = await ossInfo([orderDetail.value.orderImgUrl]);
|
||||
let imgUrls = [];
|
||||
let imgUrls = [] as string[];
|
||||
res.forEach(item => {
|
||||
imgUrls.push(item.url)
|
||||
})
|
||||
@@ -55,7 +55,7 @@ async function handleOpenChange(open: boolean) {
|
||||
}
|
||||
if (orderDetail.value.imgUrl) {
|
||||
const res = await ossInfo([orderDetail.value.imgUrl]);
|
||||
let imgUrls = [];
|
||||
let imgUrls = [] as string[];
|
||||
res.forEach(item => {
|
||||
imgUrls.push(item.url)
|
||||
})
|
||||
@@ -106,7 +106,6 @@ async function handleOpenChange(open: boolean) {
|
||||
<!-- {{ orderDetail.planCompleTime }}-->
|
||||
<!-- </DescriptionsItem>-->
|
||||
|
||||
|
||||
<DescriptionsItem label="备注" :span="2">
|
||||
{{ orderDetail.remark }}
|
||||
</DescriptionsItem>
|
||||
|
@@ -19,7 +19,7 @@ import { personList } from '#/api/property/resident/person';
|
||||
const emit = defineEmits<{ reload: [] }>();
|
||||
const costItemsOptions = ref<any>([]);
|
||||
const meterTypeOptions = ref<any>([]);
|
||||
const isMeterType = ref(false);
|
||||
const isMeterType = ref(false); //是否选择了费用类型
|
||||
const isUpdate = ref(false);
|
||||
const title = computed(() => {
|
||||
return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add');
|
||||
@@ -70,6 +70,7 @@ const schema = [
|
||||
isMeterType.value = false;
|
||||
} else {
|
||||
isMeterType.value = true;
|
||||
// 获取费用项目
|
||||
const costItemsRes = await costItemSettingList({
|
||||
pageSize: 1000000000,
|
||||
pageNum: 1,
|
||||
@@ -79,10 +80,11 @@ const schema = [
|
||||
label: item.chargeItem,
|
||||
value: item.id,
|
||||
}));
|
||||
// 获取抄表类型:水费字典为0,电费为1
|
||||
const meterTypeRes = await meterReadingTypeList({
|
||||
pageSize: 1000000000,
|
||||
pageNum: 1,
|
||||
costType: value == '5' ? 0 : 1,
|
||||
meterType: value == '5' ? '0' : '1',
|
||||
});
|
||||
meterTypeOptions.value = (meterTypeRes?.rows || []).map((item) => ({
|
||||
label: item.name,
|
||||
|
@@ -35,7 +35,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
},
|
||||
{
|
||||
title: '抄表类型',
|
||||
field: 'meterTypeId',
|
||||
field: 'costTypeName',
|
||||
},
|
||||
{
|
||||
title: '本期度数',
|
||||
|
@@ -33,8 +33,13 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
export const columns: VxeGridProps['columns'] = [
|
||||
{ type: 'checkbox', width: 60 },
|
||||
{
|
||||
title: '房屋',
|
||||
field: 'roomNumber',
|
||||
title: '费用类型',
|
||||
field: 'costType',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.costType, 'pro_expense_type');
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '费用项目',
|
||||
|
@@ -36,7 +36,7 @@ async function handleOpenChange(open: boolean) {
|
||||
<BasicModal :footer="false" :fullscreen-button="false" title="缴费审核详情" class="w-[70%]">
|
||||
<Descriptions v-if="paymentReviewDetail" size="small" :column="2" bordered
|
||||
:labelStyle="{width:'120px'}">
|
||||
<DescriptionsItem label="房屋">
|
||||
<DescriptionsItem label="房屋" v-if="paymentReviewDetail.roomNumber">
|
||||
{{ paymentReviewDetail.roomNumber }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="费用项目">
|
||||
|
@@ -0,0 +1,88 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import { cloneDeep } from '@vben/utils';
|
||||
import { useVbenForm } from '#/adapter/form';
|
||||
import { contingenPlanInfo, contingenPlanUpdate } from '#/api/property/customerService/contingenPlan';
|
||||
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
||||
import {schema} from './data';
|
||||
|
||||
const emit = defineEmits<{ reload: [] }>();
|
||||
|
||||
const [BasicForm, formApi] = useVbenForm({
|
||||
commonConfig: {
|
||||
formItemClass: 'col-span-1',
|
||||
labelWidth: 80,
|
||||
componentProps: {
|
||||
class: 'w-full',
|
||||
}
|
||||
},
|
||||
schema: schema(),
|
||||
showDefaultActions: false,
|
||||
wrapperClass: 'grid-cols-2',
|
||||
});
|
||||
|
||||
const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
|
||||
{
|
||||
initializedGetter: defaultFormValueGetter(formApi),
|
||||
currentGetter: defaultFormValueGetter(formApi),
|
||||
},
|
||||
);
|
||||
|
||||
const record = ref({})
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
// 在这里更改宽度
|
||||
class: 'w-[550px]',
|
||||
fullscreenButton: false,
|
||||
onBeforeClose,
|
||||
onClosed: handleClosed,
|
||||
onConfirm: handleConfirm,
|
||||
onOpenChange: async (isOpen) => {
|
||||
if (!isOpen) {
|
||||
return null;
|
||||
}
|
||||
modalApi.modalLoading(true);
|
||||
const { id } = modalApi.getData() as { id?: number | string };
|
||||
|
||||
record.value = await contingenPlanInfo(id);
|
||||
await formApi.setValues(record.value);
|
||||
|
||||
await markInitialized();
|
||||
|
||||
modalApi.modalLoading(false);
|
||||
},
|
||||
});
|
||||
|
||||
async function handleConfirm() {
|
||||
try {
|
||||
modalApi.lock(true);
|
||||
const { valid } = await formApi.validate();
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
|
||||
const data = cloneDeep(await formApi.getValues());
|
||||
record.value.status = data.status
|
||||
await contingenPlanUpdate(record.value)
|
||||
resetInitialized();
|
||||
emit('reload');
|
||||
modalApi.close();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
} finally {
|
||||
modalApi.lock(false);
|
||||
}
|
||||
}
|
||||
|
||||
async function handleClosed() {
|
||||
await formApi.resetForm();
|
||||
resetInitialized();
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicModal title="审核">
|
||||
<BasicForm />
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
@@ -156,3 +156,27 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
rules: 'required',
|
||||
},
|
||||
];
|
||||
|
||||
export const schema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '主键',
|
||||
fieldName: 'id',
|
||||
component: 'Input',
|
||||
dependencies: {
|
||||
show: () => false,
|
||||
triggerFields: [''],
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '演练状态',
|
||||
fieldName: 'status',
|
||||
component: 'RadioGroup',
|
||||
componentProps: {
|
||||
options: [
|
||||
{ label: '已取消', value: 1 },
|
||||
{ label: '待进行', value: 2 },
|
||||
],
|
||||
},
|
||||
rules: 'required',
|
||||
}
|
||||
];
|
||||
|
@@ -18,6 +18,7 @@ import type { ContingenPlanForm } from '#/api/property/customerService/contingen
|
||||
import { commonDownloadExcel } from '#/utils/file/download';
|
||||
|
||||
import contingenPlanModal from './contingenPlan-modal.vue';
|
||||
import contingenPlanExamine from './contingenPlan-examine.vue';
|
||||
import contingenPlanDetail from './contingenPlan-detail.vue';
|
||||
import { columns, querySchema } from './data';
|
||||
import {personList} from "#/api/property/resident/person";
|
||||
@@ -96,10 +97,13 @@ async function handleDelete(row: Required<ContingenPlanForm>) {
|
||||
await tableApi.query();
|
||||
}
|
||||
|
||||
const [ContingenPlanExamine, contingenPlanExamineApi] = useVbenModal({
|
||||
connectedComponent: contingenPlanExamine,
|
||||
});
|
||||
|
||||
async function handleExamine(row: Required<ContingenPlanForm>) {
|
||||
row.status = '1'
|
||||
await contingenPlanUpdate(row);
|
||||
await tableApi.query();
|
||||
contingenPlanExamineApi.setData({ id: row.id });
|
||||
contingenPlanExamineApi.open();
|
||||
}
|
||||
|
||||
function handleMultiDelete() {
|
||||
@@ -183,19 +187,12 @@ onMounted(async () => {
|
||||
</template>
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<Popconfirm
|
||||
v-if="row.status === '0'"
|
||||
:get-popup-container="getVxePopupContainer"
|
||||
placement="left"
|
||||
title="确认审核?"
|
||||
@confirm="handleExamine(row)"
|
||||
>
|
||||
<ghost-button
|
||||
@click.stop=""
|
||||
v-if="row.status === '0'"
|
||||
@click.stop="handleExamine(row)"
|
||||
>
|
||||
{{ '审核' }}
|
||||
</ghost-button>
|
||||
</Popconfirm>
|
||||
<ghost-button
|
||||
@click.stop="handleInfo(row)"
|
||||
>
|
||||
@@ -227,5 +224,6 @@ onMounted(async () => {
|
||||
</BasicTable>
|
||||
<ContingenPlanModal @reload="tableApi.query()" />
|
||||
<contingenPlanDetailModal/>
|
||||
<ContingenPlanExamine @reload="tableApi.query()" />
|
||||
</Page>
|
||||
</template>
|
||||
|
@@ -157,7 +157,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
},
|
||||
{
|
||||
label: '入驻位置',
|
||||
fieldName: 'location',
|
||||
fieldName: 'locations',
|
||||
component: 'TreeSelect',
|
||||
rules: 'selectRequired',
|
||||
formItemClass: 'col-span-2'
|
||||
|
@@ -64,7 +64,11 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
await initLocationOptions();
|
||||
if (isUpdate.value && id) {
|
||||
const record = await resident_unitInfo(id);
|
||||
await formApi.setValues({...record,authTime:[record.authBegDate,record.authEndDate]});
|
||||
let roomIds=record.location.split(',')
|
||||
await formApi.setValues({...record,
|
||||
authTime:[record.authBegDate,record.authEndDate],
|
||||
locations:roomIds
|
||||
});
|
||||
}
|
||||
await markInitialized();
|
||||
|
||||
@@ -84,7 +88,7 @@ async function handleConfirm() {
|
||||
|
||||
data.authBegDate = data.authTime[0];
|
||||
data.authEndDate = data.authTime[1];
|
||||
|
||||
data.location=data.locations.join(',')
|
||||
await (isUpdate.value ? resident_unitUpdate(data) : resident_unitAdd(data));
|
||||
resetInitialized();
|
||||
emit('reload');
|
||||
@@ -125,8 +129,9 @@ async function initLocationOptions() {
|
||||
treeNodeFilterProp: 'label',
|
||||
// 选中后显示在输入框的值
|
||||
treeNodeLabelProp: 'fullName',
|
||||
multiple:true
|
||||
}),
|
||||
fieldName: 'location',
|
||||
fieldName: 'locations',
|
||||
},
|
||||
]);
|
||||
}
|
||||
|
@@ -43,16 +43,16 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'unitName',
|
||||
minWidth:'120'
|
||||
},
|
||||
{
|
||||
title: '预定人',
|
||||
field: 'personName',
|
||||
minWidth:'120'
|
||||
},
|
||||
{
|
||||
title: '联系方式',
|
||||
field: 'phone',
|
||||
minWidth:'120'
|
||||
},
|
||||
// {
|
||||
// title: '预定人',
|
||||
// field: 'personName',
|
||||
// minWidth:'120'
|
||||
// },
|
||||
// {
|
||||
// title: '联系方式',
|
||||
// field: 'phone',
|
||||
// minWidth:'120'
|
||||
// },
|
||||
// {
|
||||
// title: '预定时间',
|
||||
// field: 'scheduledStarttime',
|
||||
@@ -64,7 +64,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
{
|
||||
title: '预定时间',
|
||||
field: 'scheduledStarttime',
|
||||
minWidth: '180',
|
||||
minWidth: '200',
|
||||
formatter: ({ row }) => {
|
||||
const start = row.scheduledStarttime;
|
||||
const end = row.scheduledEndtime;
|
||||
|
@@ -10,9 +10,14 @@
|
||||
<Select
|
||||
v-model:value="formState.meetingRoomType"
|
||||
class="room-select"
|
||||
placeholder="请选择会议室类型"
|
||||
style="width: 180px;"
|
||||
placeholder="请选择类型"
|
||||
style="width: 150px;"
|
||||
>
|
||||
<SelectOption
|
||||
key="all"
|
||||
value="all">
|
||||
全部类型
|
||||
</SelectOption>
|
||||
<SelectOption
|
||||
v-for="item in getDictOptions('meeting_room_type')"
|
||||
:key="item.value"
|
||||
@@ -20,17 +25,18 @@
|
||||
>
|
||||
{{ item.label }}
|
||||
</SelectOption>
|
||||
|
||||
</Select>
|
||||
</a-form-item>
|
||||
<a-form-item label="会议日期">
|
||||
<DatePicker v-model:value="formState.appointmentTime" style="width: 180px;"/>
|
||||
<DatePicker v-model:value="formState.appointmentTime" style="width: 130px;"/>
|
||||
</a-form-item>
|
||||
<a-form-item label="会议时段">
|
||||
<TimeRangePicker style="width: 200px;" format="HH:mm"
|
||||
<TimeRangePicker style="width: 190px;" format="HH:mm"
|
||||
v-model:value="formState.openHours"></TimeRangePicker>
|
||||
</a-form-item>
|
||||
<a-form-item label="参会人数">
|
||||
<InputNumber style="width: 150px;" placeholder="请输入参会人数"
|
||||
<InputNumber style="width: 120px;" placeholder="请输入人数"
|
||||
v-model:value="formState.personNumber"/>
|
||||
</a-form-item>
|
||||
<a-form-item >
|
||||
@@ -113,7 +119,7 @@ async function handleSearch() {
|
||||
openStartHours: openStartHours??undefined,
|
||||
openEndHours:openEndHours??undefined,
|
||||
appointmentTime:formState.appointmentTime?formState.appointmentTime.format('YYYY-MM-DD'):undefined,
|
||||
meetingRoomType:formState.meetingRoomType
|
||||
meetingRoomType:formState.meetingRoomType=='all'?undefined:formState.meetingRoomType,
|
||||
}
|
||||
meetingList.value =await notlist(obj);
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'meetingRoomType',
|
||||
slots: {
|
||||
default: ({row}) => {
|
||||
return renderDict(row.meetingRoomType, 'meeting_room_type');
|
||||
return row.meetingRoomType!=null?renderDict(row.meetingRoomType, 'meeting_room_type'):'';
|
||||
},
|
||||
},
|
||||
minWidth:100,
|
||||
|
@@ -1,5 +1,6 @@
|
||||
import type { FormSchemaGetter } from '#/adapter/form';
|
||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||
import {renderDict} from "#/utils/render";
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
@@ -87,6 +88,11 @@ export const columns: VxeGridProps['columns'] = [
|
||||
{
|
||||
title: '事由',
|
||||
field: 'visitingReason',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.visitingReason, 'reason_for_visit');
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '拜访时间',
|
||||
|
@@ -36,17 +36,17 @@ const { authPanelCenter, authPanelLeft, authPanelRight, isDark } =
|
||||
usePreferences();
|
||||
</script> -->
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useAuthStore } from '../../../../../apps/web-antd/src/store'
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useAuthStore } from '../../../../../apps/web-antd/src/store';
|
||||
import { Checkbox } from 'ant-design-vue';
|
||||
const router = useRouter()
|
||||
const router = useRouter();
|
||||
const authStore = useAuthStore();
|
||||
|
||||
// 响应式数据
|
||||
const username = ref('')
|
||||
const password = ref('')
|
||||
const rememberMe = ref(false)
|
||||
const username = ref('');
|
||||
const password = ref('');
|
||||
const rememberMe = ref(false);
|
||||
|
||||
// 页面加载时恢复用户名
|
||||
onMounted(() => {
|
||||
@@ -58,55 +58,59 @@ onMounted(() => {
|
||||
});
|
||||
function getRetUrlParam() {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
console.log('urlParams', urlParams);
|
||||
return urlParams.get('returl');
|
||||
}
|
||||
const retUrl : string | null = getRetUrlParam();
|
||||
const retUrl: string | null = getRetUrlParam();
|
||||
|
||||
// 登录逻辑
|
||||
const login = () => {
|
||||
// 验证输入
|
||||
if (!username.value.trim()) {
|
||||
alert('请输入用户名')
|
||||
return
|
||||
alert('请输入用户名');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!password.value.trim()) {
|
||||
alert('请输入密码')
|
||||
return
|
||||
alert('请输入密码');
|
||||
return;
|
||||
}
|
||||
|
||||
// 模拟登录请求
|
||||
console.log('正在登录...', { username: username.value, password: password.value })
|
||||
console.log('正在登录...', {
|
||||
username: username.value,
|
||||
password: password.value,
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
alert('登录成功!')
|
||||
alert('登录成功!');
|
||||
|
||||
// 存储用户名
|
||||
if (rememberMe.value) {
|
||||
localStorage.setItem('rememberedUser', username.value)
|
||||
localStorage.setItem('rememberedUser', username.value);
|
||||
} else {
|
||||
localStorage.removeItem('rememberedUser')
|
||||
localStorage.removeItem('rememberedUser');
|
||||
}
|
||||
|
||||
// 跳转页面
|
||||
router.push('/navigation')
|
||||
}, 800)
|
||||
}
|
||||
router.push('/navigation');
|
||||
}, 800);
|
||||
};
|
||||
const handleAccountLogin = async () => {
|
||||
try {
|
||||
// const requestParam: any = omit(values, ['code']);
|
||||
// 登录
|
||||
await authStore.authLogin({
|
||||
grantType: "password",
|
||||
grantType: 'password',
|
||||
password: password.value,
|
||||
tenantId: "000000",
|
||||
tenantId: '000000',
|
||||
username: username.value,
|
||||
retUrl: retUrl,
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -122,7 +126,11 @@ const handleAccountLogin = async () => {
|
||||
<h3>用户登录</h3>
|
||||
<!-- 用户名输入 -->
|
||||
<div class="input-group">
|
||||
<img src="../../../../../apps/web-antd/src/assets/my.png" alt="User Icon" class="input-icon">
|
||||
<img
|
||||
src="../../../../../apps/web-antd/src/assets/my.png"
|
||||
alt="User Icon"
|
||||
class="input-icon"
|
||||
/>
|
||||
<input
|
||||
type="text"
|
||||
placeholder="请输入您的用户名"
|
||||
@@ -132,7 +140,11 @@ const handleAccountLogin = async () => {
|
||||
|
||||
<!-- 密码输入 -->
|
||||
<div class="input-group">
|
||||
<img src="../../../../../apps/web-antd/src/assets/mima.png" alt="Password Icon" class="input-icon">
|
||||
<img
|
||||
src="../../../../../apps/web-antd/src/assets/mima.png"
|
||||
alt="Password Icon"
|
||||
class="input-icon"
|
||||
/>
|
||||
<input
|
||||
type="password"
|
||||
placeholder="请输入您的密码"
|
||||
@@ -280,7 +292,8 @@ const handleAccountLogin = async () => {
|
||||
<style scoped>
|
||||
@font-face {
|
||||
font-family: 'BaiduVariety';
|
||||
src: url('../../../../../apps/web-antd/src/assets/fonts/百度综艺简体.ttf') format('truetype');
|
||||
src: url('../../../../../apps/web-antd/src/assets/fonts/百度综艺简体.ttf')
|
||||
format('truetype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
@@ -293,14 +306,16 @@ const handleAccountLogin = async () => {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background:
|
||||
/* url('../../../../../apps/web-antd/src/assets/juxing.png') no-repeat center center fixed, */
|
||||
url('../../../../../apps/web-antd/src/assets/222.png') no-repeat center center fixed;
|
||||
background-size: 100% 100%, 100% 100%;
|
||||
/* url('../../../../../apps/web-antd/src/assets/juxing.png') no-repeat center center fixed, */ url('../../../../../apps/web-antd/src/assets/222.png')
|
||||
no-repeat center center fixed;
|
||||
background-size:
|
||||
100% 100%,
|
||||
100% 100%;
|
||||
/* background-repeat: no-repeat, no-repeat;
|
||||
background-position: center center, center center; */
|
||||
color: #fff;
|
||||
}
|
||||
.login-wapter{
|
||||
.login-wapter {
|
||||
position: relative;
|
||||
top: -115px; /* 负值越大,越往上 */
|
||||
.login-wapter1 {
|
||||
@@ -308,8 +323,8 @@ const handleAccountLogin = async () => {
|
||||
margin-bottom: 20px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.login-wapter2 {
|
||||
}
|
||||
.login-wapter2 {
|
||||
font-size: 60px;
|
||||
/* margin-bottom: 38px; */
|
||||
background: linear-gradient(to bottom, #ffffff, #cbeaff);
|
||||
@@ -320,9 +335,9 @@ const handleAccountLogin = async () => {
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
font-family: 'BaiduVariety',sans-serif;
|
||||
font-family: 'BaiduVariety', sans-serif;
|
||||
letter-spacing: 6px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.login-bg_1 {
|
||||
flex-direction: column;
|
||||
@@ -335,7 +350,8 @@ const handleAccountLogin = async () => {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
background: url('../../../../../apps/web-antd/src/assets/from.png') no-repeat center center fixed;
|
||||
background: url('../../../../../apps/web-antd/src/assets/from.png') no-repeat
|
||||
center center fixed;
|
||||
}
|
||||
.login-form {
|
||||
border-radius: 10px;
|
||||
@@ -380,8 +396,8 @@ input:-webkit-autofill {
|
||||
margin-top: 20px;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
background-color: #19DCF8;
|
||||
color: #0254A5;
|
||||
background-color: #19dcf8;
|
||||
color: #0254a5;
|
||||
cursor: pointer;
|
||||
font-size: 22px;
|
||||
margin-top: 70px;
|
||||
@@ -401,8 +417,6 @@ input:-webkit-autofill {
|
||||
color: #eee;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* 新增 .input-group 样式 */
|
||||
.input-group {
|
||||
display: flex;
|
||||
@@ -433,7 +447,7 @@ input:-webkit-autofill {
|
||||
.login-form input::placeholder {
|
||||
color: rgba(255, 255, 255, 0.42); /* 例如灰色 */
|
||||
}
|
||||
.login-footer{
|
||||
.login-footer {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
|
@@ -11,7 +11,7 @@ import {
|
||||
LanguageToggle,
|
||||
PreferencesButton,
|
||||
ThemeToggle,
|
||||
BackNavigation,
|
||||
// BackNavigation,
|
||||
} from '../../widgets';
|
||||
|
||||
interface Props {
|
||||
@@ -44,8 +44,7 @@ const rightSlots = computed(() => {
|
||||
list.push({
|
||||
index: REFERENCE_VALUE,
|
||||
name: 'global-search',
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
if (preferencesButtonPosition.value.header) {
|
||||
@@ -172,9 +171,9 @@ function clearPreferencesAndLogout() {
|
||||
<template v-else-if="slot.name === 'fullscreen'">
|
||||
<VbenFullScreen class="mr-1" />
|
||||
</template>
|
||||
<template v-else-if="slot.name === 'back-navigation'">
|
||||
<!-- <template v-else-if="slot.name === 'back-navigation'">
|
||||
<BackNavigation class="mr-1" />
|
||||
</template>
|
||||
</template> -->
|
||||
</slot>
|
||||
</template>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user