diff --git a/src/views/error/403.vue b/src/views/error/403.vue new file mode 100644 index 0000000..a3ec487 --- /dev/null +++ b/src/views/error/403.vue @@ -0,0 +1,8 @@ + + diff --git a/src/views/error/404.vue b/src/views/error/404.vue new file mode 100644 index 0000000..f6a08de --- /dev/null +++ b/src/views/error/404.vue @@ -0,0 +1,7 @@ + + diff --git a/src/views/error/500.vue b/src/views/error/500.vue new file mode 100644 index 0000000..998487d --- /dev/null +++ b/src/views/error/500.vue @@ -0,0 +1,7 @@ + + diff --git a/src/views/home/Index copy.vue b/src/views/home/Index copy.vue new file mode 100644 index 0000000..121ec6a --- /dev/null +++ b/src/views/home/Index copy.vue @@ -0,0 +1,381 @@ + + diff --git a/src/views/home/Index2.vue b/src/views/home/Index2.vue new file mode 100644 index 0000000..c9429ab --- /dev/null +++ b/src/views/home/Index2.vue @@ -0,0 +1,319 @@ + + + + diff --git a/src/views/home/Indexbark.vue b/src/views/home/Indexbark.vue new file mode 100644 index 0000000..2627b64 --- /dev/null +++ b/src/views/home/Indexbark.vue @@ -0,0 +1,653 @@ + + + \ No newline at end of file diff --git a/src/views/home/echarts-data.ts b/src/views/home/echarts-data.ts new file mode 100644 index 0000000..0f39f4e --- /dev/null +++ b/src/views/home/echarts-data.ts @@ -0,0 +1,181 @@ +import { EChartsOption } from 'echarts' + +const { t } = useI18n() + +export const lineOptions: EChartsOption = { + title: { + text: t('analysis.monthlySales'), + left: 'center' + }, + xAxis: { + data: [ + ], + boundaryGap: false, + axisTick: { + show: false + } + }, + grid: { + left: 20, + right: 20, + bottom: 20, + top: 80, + containLabel: true + }, + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'cross' + }, + padding: [5, 10] + }, + yAxis: { + axisTick: { + show: false + } + }, + legend: { + data: [], + top: 50 + }, + series: [ + { + name: "", + smooth: true, + type: 'line', + data: [], + animationDuration: 2800, + animationEasing: 'cubicInOut' + }, + { + name: t('analysis.actual'), + smooth: true, + type: 'line', + itemStyle: {}, + data: [], + animationDuration: 2800, + animationEasing: 'quadraticOut' + } + ] +} + +export const pieOptions: EChartsOption = { + title: { + text: "", + left: 'center' + }, + tooltip: { + trigger: 'item', + formatter: '{a}
{b} : {c} ({d}%)' + }, + legend: { + orient: 'vertical', + left: 'left', + data: [ + ] + }, + series: [ + { + name: "", + type: 'pie', + radius: '55%', + center: ['50%', '60%'], + data: [ + ] + } + ] +} + +export const barOptions: EChartsOption = { + title: { + text: "", + left: 'center' + }, + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'shadow' + } + }, + grid: { + left: 50, + right: 20, + bottom: 20 + }, + xAxis: { + type: 'category', + data: [ + ], + axisTick: { + alignWithLabel: true + } + }, + yAxis: { + type: 'value' + }, + series: [ + { + name: "", + data: [], + type: 'bar' + } + ] +} + +export const radarOption: EChartsOption = { + legend: { + data: [] + }, + radar: { + // shape: 'circle', + indicator: [ + + ] + }, + series: [ + { + name: "", + type: 'radar', + data: [ + + ] + } + ] +} + +export const wordOptions = { + series: [ + { + type: 'wordCloud', + gridSize: 2, + sizeRange: [12, 50], + rotationRange: [-90, 90], + shape: 'pentagon', + width: 600, + height: 400, + drawOutOfBound: true, + textStyle: { + color: function () { + return ( + 'rgb(' + + [ + Math.round(Math.random() * 160), + Math.round(Math.random() * 160), + Math.round(Math.random() * 160) + ].join(',') + + ')' + ) + } + }, + emphasis: { + textStyle: { + shadowBlur: 10, + shadowColor: '#333' + } + }, + data: [ + + ] + } + ] +} diff --git a/src/views/home/index.vue b/src/views/home/index.vue new file mode 100644 index 0000000..ad22b79 --- /dev/null +++ b/src/views/home/index.vue @@ -0,0 +1,227 @@ + + + diff --git a/src/views/home/types.ts b/src/views/home/types.ts new file mode 100644 index 0000000..e6313d3 --- /dev/null +++ b/src/views/home/types.ts @@ -0,0 +1,55 @@ +export type WorkplaceTotal = { + project: number + access: number + todo: number +} + +export type Project = { + name: string + icon: string + message: string + personal: string + time: Date | number | string +} + +export type Notice = { + title: string + type: string + keys: string[] + date: Date | number | string +} + +export type Shortcut = { + name: string + icon: string + url: string +} + +export type RadarData = { + personal: number + team: number + max: number + name: string +} +export type AnalysisTotalTypes = { + users: number + messages: number + moneys: number + shoppings: number +} + +export type UserAccessSource = { + value: number + name: string +} + +export type WeeklyUserActivity = { + value: number + name: string +} + +export type MonthlySales = { + name: string + estimate: number + actual: number +} diff --git a/src/views/login/components/LoginForm.vue b/src/views/login/components/LoginForm.vue new file mode 100644 index 0000000..740a6fc --- /dev/null +++ b/src/views/login/components/LoginForm.vue @@ -0,0 +1,287 @@ + + + + diff --git a/src/views/login/components/LoginFormTitle.vue b/src/views/login/components/LoginFormTitle.vue new file mode 100644 index 0000000..cdf4fac --- /dev/null +++ b/src/views/login/components/LoginFormTitle.vue @@ -0,0 +1,26 @@ + + diff --git a/src/views/login/components/MobileForm.vue b/src/views/login/components/MobileForm.vue new file mode 100644 index 0000000..29f704c --- /dev/null +++ b/src/views/login/components/MobileForm.vue @@ -0,0 +1,225 @@ + + + + diff --git a/src/views/login/components/QrCodeForm.vue b/src/views/login/components/QrCodeForm.vue new file mode 100644 index 0000000..31d2845 --- /dev/null +++ b/src/views/login/components/QrCodeForm.vue @@ -0,0 +1,30 @@ + + diff --git a/src/views/login/components/RegisterForm.vue b/src/views/login/components/RegisterForm.vue new file mode 100644 index 0000000..23b3bd4 --- /dev/null +++ b/src/views/login/components/RegisterForm.vue @@ -0,0 +1,142 @@ + + diff --git a/src/views/login/components/SSOLogin.vue b/src/views/login/components/SSOLogin.vue new file mode 100644 index 0000000..f31ab0e --- /dev/null +++ b/src/views/login/components/SSOLogin.vue @@ -0,0 +1,199 @@ + + diff --git a/src/views/login/components/index.ts b/src/views/login/components/index.ts new file mode 100644 index 0000000..204ad73 --- /dev/null +++ b/src/views/login/components/index.ts @@ -0,0 +1,8 @@ +import LoginForm from './LoginForm.vue' +import MobileForm from './MobileForm.vue' +import LoginFormTitle from './LoginFormTitle.vue' +import RegisterForm from './RegisterForm.vue' +import QrCodeForm from './QrCodeForm.vue' +import SSOLoginVue from './SSOLogin.vue' + +export { LoginForm, MobileForm, LoginFormTitle, RegisterForm, QrCodeForm, SSOLoginVue } diff --git a/src/views/login/components/useLogin.ts b/src/views/login/components/useLogin.ts new file mode 100644 index 0000000..b4a02f8 --- /dev/null +++ b/src/views/login/components/useLogin.ts @@ -0,0 +1,42 @@ +import { Ref } from 'vue' + +export enum LoginStateEnum { + LOGIN, + REGISTER, + RESET_PASSWORD, + MOBILE, + QR_CODE, + SSO +} + +const currentState = ref(LoginStateEnum.LOGIN) + +export function useLoginState() { + function setLoginState(state: LoginStateEnum) { + currentState.value = state + } + const getLoginState = computed(() => currentState.value) + + function handleBackLogin() { + setLoginState(LoginStateEnum.LOGIN) + } + + return { + setLoginState, + getLoginState, + handleBackLogin + } +} + +export function useFormValid(formRef: Ref) { + async function validForm() { + const form = unref(formRef) + if (!form) return + const data = await form.validate() + return data as T + } + + return { + validForm + } +} diff --git a/src/views/login/login.vue b/src/views/login/login.vue new file mode 100644 index 0000000..48965b7 --- /dev/null +++ b/src/views/login/login.vue @@ -0,0 +1,111 @@ + + + + diff --git a/src/views/profile/components/BasicInfo.vue b/src/views/profile/components/BasicInfo.vue new file mode 100644 index 0000000..e2189b1 --- /dev/null +++ b/src/views/profile/components/BasicInfo.vue @@ -0,0 +1,92 @@ + + diff --git a/src/views/profile/components/ProfileUser.vue b/src/views/profile/components/ProfileUser.vue new file mode 100644 index 0000000..b493499 --- /dev/null +++ b/src/views/profile/components/ProfileUser.vue @@ -0,0 +1,99 @@ + + + + diff --git a/src/views/profile/components/ResetPwd.vue b/src/views/profile/components/ResetPwd.vue new file mode 100644 index 0000000..477be91 --- /dev/null +++ b/src/views/profile/components/ResetPwd.vue @@ -0,0 +1,73 @@ + + diff --git a/src/views/profile/components/UserAvatar.vue b/src/views/profile/components/UserAvatar.vue new file mode 100644 index 0000000..c20168f --- /dev/null +++ b/src/views/profile/components/UserAvatar.vue @@ -0,0 +1,39 @@ + + + + diff --git a/src/views/profile/components/UserSocial.vue b/src/views/profile/components/UserSocial.vue new file mode 100644 index 0000000..2f021ab --- /dev/null +++ b/src/views/profile/components/UserSocial.vue @@ -0,0 +1,94 @@ + + diff --git a/src/views/profile/components/index.ts b/src/views/profile/components/index.ts new file mode 100644 index 0000000..9e1883c --- /dev/null +++ b/src/views/profile/components/index.ts @@ -0,0 +1,7 @@ +import BasicInfo from './BasicInfo.vue' +import ProfileUser from './ProfileUser.vue' +import ResetPwd from './ResetPwd.vue' +import UserAvatarVue from './UserAvatar.vue' +import UserSocial from './UserSocial.vue' + +export { BasicInfo, ProfileUser, ResetPwd, UserAvatarVue, UserSocial } diff --git a/src/views/profile/index.vue b/src/views/profile/index.vue new file mode 100644 index 0000000..e813f04 --- /dev/null +++ b/src/views/profile/index.vue @@ -0,0 +1,64 @@ + + + diff --git a/src/views/redirect/redirect.vue b/src/views/redirect/redirect.vue new file mode 100644 index 0000000..f7717ce --- /dev/null +++ b/src/views/redirect/redirect.vue @@ -0,0 +1,28 @@ + +