feat:重构模块
This commit is contained in:
@@ -1,181 +0,0 @@
|
||||
<template>
|
||||
<div class="admin-module">
|
||||
<div class="button-container">
|
||||
<el-button type="primary" @click="addClick">新增账号</el-button>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
:data="accountInfo.accountList"
|
||||
border stripe
|
||||
:header-cell-style="tableHeaderStyle()"
|
||||
:cell-style="tableCellStyle()"
|
||||
:row-style="tableRowStyle()"
|
||||
style="width: 100%"
|
||||
class="card-item">
|
||||
<el-table-column type="index" align="center" width="50" />
|
||||
<el-table-column prop="username" label="用户姓名" align="center" min-width="20%"/>
|
||||
<el-table-column prop="accountName" label="账号名称" align="center" min-width="20%"/>
|
||||
<el-table-column prop="date" label="创建日期" align="center" min-width="20%"/>
|
||||
<el-table-column label="账号状态" align="center" min-width="20%">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.state === 0" type="primary">正常</el-tag>
|
||||
<el-tag v-else-if="scope.row.state === 1" type="warning">禁用</el-tag>
|
||||
<el-tag v-else-if="scope.row.state === 2" type="danger">注销</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" label="操作" align="center" width="280">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" @click="resetClick(scope.row)">重置密码</el-button>
|
||||
<el-button type="primary" @click="disableClick(scope.row)">禁用</el-button>
|
||||
<el-button type="danger" @click="deleteClick(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-dialog v-model="accountInfo.accountDialog.visible"
|
||||
:title="accountInfo.accountDialog.title"
|
||||
center width="500" @open="openDialogEvent">
|
||||
<el-form ref="formRef" :model="accountInfo.accountDialog.data"
|
||||
:rules="rules" label-width="100px">
|
||||
<el-form-item label="账号名称" prop="accountName">
|
||||
<el-input v-model="accountInfo.accountDialog.data.accountName" autocomplete="off"
|
||||
placeholder="请输入账号名称(登录账号)"
|
||||
:maxlength="10" show-word-limit clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户姓名" prop="username">
|
||||
<el-input v-model="accountInfo.accountDialog.data.username" autocomplete="off"
|
||||
placeholder="请输入用户姓名"
|
||||
:maxlength="10" show-word-limit clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="账号密码" prop="password">
|
||||
<el-input v-model="accountInfo.accountDialog.data.password" autocomplete="off"
|
||||
placeholder="请输入密码" clearable show-password/>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认密码" prop="confirmPassword">
|
||||
<el-input v-model="accountInfo.accountDialog.data.confirmPassword" autocomplete="off"
|
||||
placeholder="请再次输入密码" clearable show-password/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="cancelClick">取消</el-button>
|
||||
<el-button type="primary" @click="confirmClick">确认</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { nextTick, onMounted, reactive, ref } from 'vue'
|
||||
import { commonElMessageBox, tableCellStyle, tableHeaderStyle, tableRowStyle } from 'vue3-common/utils/elUtil'
|
||||
import { IAccount } from '@/types/auth.ts'
|
||||
import { ElMessage, FormRules } from 'element-plus'
|
||||
import type { IDialog, IHandleApi } from 'vue3-common/types'
|
||||
import { accountRules } from '@/utils/element/elRules.ts'
|
||||
import { deleteAccountApi, queryAccountApi, registerAccountApi } from '@/apis/account.ts'
|
||||
const formRef = ref()
|
||||
const rules = reactive<FormRules>(accountRules)
|
||||
|
||||
const accountInfo = reactive({
|
||||
accountList: [] as IAccount[],
|
||||
setAccountType: 'ADD' as IHandleApi,
|
||||
accountDialog: {
|
||||
title: '',
|
||||
visible: false,
|
||||
data: {}
|
||||
} as IDialog<IAccount>
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
accountInfo.accountList = await queryAccountApi()
|
||||
})
|
||||
|
||||
const addClick = () => {
|
||||
accountInfo.setAccountType = 'ADD'
|
||||
accountInfo.accountDialog = {
|
||||
title: '新增账号',
|
||||
visible: true,
|
||||
data: {
|
||||
accountName: '',
|
||||
password: '',
|
||||
confirmPassword: '',
|
||||
username: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击编辑按钮
|
||||
* @param account 账户
|
||||
*/
|
||||
const resetClick = async (account: IAccount) => {
|
||||
|
||||
}
|
||||
|
||||
const disableClick = (account: IAccount) => {
|
||||
ElMessage.info('该功能暂未开发')
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击删除按钮
|
||||
* @param account 账户
|
||||
*/
|
||||
const deleteClick = (account: IAccount) => {
|
||||
commonElMessageBox(`请确认删除该账号:${account.accountName} ?`).then(() => {
|
||||
accountInfo.setAccountType = 'DELETE'
|
||||
setAccountApi(account.id)
|
||||
})
|
||||
}
|
||||
|
||||
const openDialogEvent = () => {
|
||||
nextTick(() => {
|
||||
formRef.value.clearValidate()
|
||||
})
|
||||
}
|
||||
|
||||
const setAccountApi = async (id?: number) => {
|
||||
switch (accountInfo.setAccountType) {
|
||||
case 'ADD':
|
||||
if (checkPassword()) {
|
||||
await registerAccountApi(accountInfo.accountDialog.data)
|
||||
ElMessage.success('新增账号成功')
|
||||
}
|
||||
break
|
||||
case 'DELETE':
|
||||
await deleteAccountApi(id)
|
||||
ElMessage.success('删除账号成功')
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
accountInfo.accountList = await queryAccountApi()
|
||||
accountInfo.accountDialog.visible = false
|
||||
}
|
||||
|
||||
const checkPassword = () => {
|
||||
const { password, confirmPassword } = accountInfo.accountDialog.data
|
||||
if (password !== confirmPassword) {
|
||||
ElMessage.error('请确认两次密码是否一致')
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
const cancelClick = () => {
|
||||
accountInfo.accountDialog.visible = false
|
||||
}
|
||||
|
||||
const confirmClick = async () => {
|
||||
await formRef.value.validate(async (valid) => {
|
||||
if (valid) {
|
||||
if (accountInfo.setAccountType === 'ADD') {
|
||||
if (checkPassword()) {
|
||||
await setAccountApi(accountInfo.accountDialog.data.id)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
@@ -1,109 +0,0 @@
|
||||
<template>
|
||||
<div class="admin-module">
|
||||
<div class="button-container">
|
||||
<el-button type="primary" @click="addNewBlogClick">新增文章</el-button>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
:data="blogStore.blogList"
|
||||
border stripe
|
||||
:header-cell-style="tableHeaderStyle()"
|
||||
:cell-style="tableCellStyle()"
|
||||
:row-style="tableRowStyle()"
|
||||
class="card-item">
|
||||
<el-table-column type="index" align="center" width="50" />
|
||||
<el-table-column prop="title" label="标题" align="center" min-width="10%"/>
|
||||
<el-table-column prop="category" label="类别" align="center" min-width="10%" />
|
||||
<el-table-column label="精品" align="center" min-width="10%">
|
||||
<template #default="scope">
|
||||
<el-tag type="success" v-if="scope.row.isGreat">是</el-tag>
|
||||
<el-tag type="danger" v-else>否</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="置顶" align="center" min-width="10%">
|
||||
<template #default="scope">
|
||||
<el-tag type="success" v-if="scope.row.topValue > 1">是</el-tag>
|
||||
<el-tag type="danger" v-else>否</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="wordCount" label="字数" align="center" min-width="10%" />
|
||||
<el-table-column prop="visitCount" label="阅读次数" align="center" min-width="10%" />
|
||||
<el-table-column fixed="right" label="操作" align="center" width="250">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" @click="previewBlogClick(scope.row)">预览</el-button>
|
||||
<el-button type="primary" @click="editBlogClick(scope.row)">编辑</el-button>
|
||||
<el-button type="danger" @click="deleteBlogClick(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
v-model:current-page="blogStore.adminPageInfo.currentPage"
|
||||
:page-size="blogStore.adminPageInfo.pageSize"
|
||||
:total="blogStore.adminPageInfo.totalSize"
|
||||
layout="total, prev, pager, next"
|
||||
@change="changePageClick"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted } from 'vue'
|
||||
import { useBlogStore } from '@/store/blog.ts'
|
||||
import { IBlog } from '@/types/blog.ts'
|
||||
import { commonElMessageBox, tableCellStyle, tableHeaderStyle, tableRowStyle } from 'vue3-common/utils/elUtil'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const router = useRouter()
|
||||
const blogStore = useBlogStore()
|
||||
|
||||
onMounted(async () => {
|
||||
await blogStore.queryAdminBlog()
|
||||
})
|
||||
|
||||
/**
|
||||
* 点击切换博客页数按钮
|
||||
* @param page 页码
|
||||
* @param pageSize 每页大小
|
||||
*/
|
||||
const changePageClick = async (page: number, pageSize: number) => {
|
||||
blogStore.adminPageInfo.currentPage = page
|
||||
blogStore.adminPageInfo.pageSize = pageSize
|
||||
await blogStore.queryAdminBlog()
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击新增博客按钮
|
||||
*/
|
||||
const addNewBlogClick = () => {
|
||||
router.push({ name: 'AdminBlogDetailId', params: { id: 0 } })
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击预览博客按钮
|
||||
* @param blog 博客
|
||||
*/
|
||||
const previewBlogClick = async (blog: IBlog) => {
|
||||
await router.push({ name: 'AdminBlogPreviewId', params: { id: blog.id } })
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击编辑博客按钮
|
||||
* @param blog 博客
|
||||
*/
|
||||
const editBlogClick = async (blog: IBlog) => {
|
||||
await router.push({ name: 'AdminBlogDetailId', params: { id: blog.id } })
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击删除博客按钮
|
||||
* @param blog 博客
|
||||
*/
|
||||
const deleteBlogClick = (blog: IBlog) => {
|
||||
blogStore.blogApiType = 'DELETE'
|
||||
|
||||
commonElMessageBox('是否确认删除该博客?').then(() => {
|
||||
blogStore.handleBlogApi(blog.id)
|
||||
})
|
||||
}
|
||||
</script>
|
||||
@@ -1,82 +0,0 @@
|
||||
<template>
|
||||
<div class="admin-module">
|
||||
<div class="button-container">
|
||||
<el-button type="primary" @click="addNewCategoryClick">新增类别</el-button>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
:data="blogStore.blogCategoryList"
|
||||
border stripe
|
||||
:header-cell-style="tableHeaderStyle()"
|
||||
:cell-style="tableCellStyle()"
|
||||
:row-style="tableRowStyle()"
|
||||
style="width: 50%"
|
||||
class="card-item">
|
||||
<el-table-column type="index" align="center" width="50" />
|
||||
<el-table-column prop="name" label="名称" align="center" min-width="10%"/>
|
||||
<el-table-column prop="count" label="数量" align="center" min-width="10%" />
|
||||
<el-table-column fixed="right" label="操作" align="center" width="200">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" @click="editCategoryClick(scope.row)">编辑</el-button>
|
||||
<el-button type="danger" @click="deleteCategoryClick(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted } from 'vue'
|
||||
import { useBlogStore } from '@/store/blog.ts'
|
||||
import { IBlogCategory } from '@/types/blog.ts'
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
import { tableCellStyle, tableHeaderStyle, tableRowStyle } from 'vue3-common/utils/elUtil'
|
||||
|
||||
const blogStore = useBlogStore()
|
||||
|
||||
onMounted(async () => {
|
||||
await blogStore.queryBlogCategory()
|
||||
})
|
||||
|
||||
/**
|
||||
* 点击新增类别按钮
|
||||
*/
|
||||
const addNewCategoryClick = () => {
|
||||
ElMessageBox.prompt('请输入类别名称', '新增类别', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
inputPlaceholder: '请输入类别名称',
|
||||
inputPattern: /^.{0,10}$/,
|
||||
inputErrorMessage: '请输入10字以内的类别名称'
|
||||
})
|
||||
.then(({ value }) => {
|
||||
console.log(value)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击编辑类别按钮
|
||||
* @param category 类别
|
||||
*/
|
||||
const editCategoryClick = async (category: IBlogCategory) => {
|
||||
ElMessageBox.prompt('请输入类别名称', '编辑类别', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
inputValue: category.name,
|
||||
inputPlaceholder: '请输入类别名称',
|
||||
inputPattern: /^.{0,10}$/,
|
||||
inputErrorMessage: '请输入10字以内的类别名称'
|
||||
})
|
||||
.then(({ value }) => {
|
||||
console.log(value)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击删除类别按钮
|
||||
* @param category 类别
|
||||
*/
|
||||
const deleteCategoryClick = (category: IBlogCategory) => {
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -1,149 +0,0 @@
|
||||
<template>
|
||||
<div class="admin-module admin-blog-detail">
|
||||
<el-form ref="formRef" :model="blogStore.newBlog"
|
||||
:inline="true" :rules="rules"
|
||||
class="blog-form">
|
||||
<el-form-item label="标题" name="title" prop="title">
|
||||
<el-input v-model="blogStore.newBlog.title"
|
||||
:maxlength="20" show-word-limit clearable
|
||||
style="width: 300px"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="分类" name="category" prop="category">
|
||||
<el-select
|
||||
v-model="blogStore.newBlog.category"
|
||||
filterable allow-create placeholder="请选择分类" clearable
|
||||
@focus="focusCategoryEvent" style="width: 150px">
|
||||
<el-option
|
||||
v-for="(value, index) in blogStore.blogCategoryList"
|
||||
:key="index" :label="value.name" :value="value.name"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="置顶值">
|
||||
<el-input-number v-model="blogStore.newBlog.topValue"
|
||||
:min="1" :max="10" style="width: 120px"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="精品">
|
||||
<el-switch v-model="blogStore.newBlog.isGreat"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<MdEditor v-model="blogStore.newBlog.content" @onUploadImg="onUploadImg"/>
|
||||
|
||||
<div class="button-container">
|
||||
<el-button type="primary" @click="backClick">返回</el-button>
|
||||
<el-button type="primary" @click="submitFormEvent">保存</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, onMounted, nextTick } from 'vue'
|
||||
import { useBlogStore } from '@/store/blog.ts'
|
||||
import { MdEditor } from 'md-editor-v3'
|
||||
import 'md-editor-v3/lib/style.css'
|
||||
import { ElLoading, ElMessage, FormInstance, FormRules } from 'element-plus'
|
||||
import { blogRules } from '@/utils/element/elRules.ts'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import { validateBlogImage } from '@/utils/blog/blogUtil'
|
||||
import { doUploadFile } from 'vue3-common/utils/fileUtil'
|
||||
import { fileServiceUrl, serviceFileRootPath } from '@/utils'
|
||||
|
||||
const rules = reactive<FormRules>(blogRules)
|
||||
|
||||
const formRef = ref<FormInstance>()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const blogStore = useBlogStore()
|
||||
|
||||
const focusCategoryEvent = async () => {
|
||||
await blogStore.queryAdminBlogCategory()
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await nextTick(() => {
|
||||
formRef.value?.clearValidate()
|
||||
})
|
||||
|
||||
const blogId = route.params.id as number
|
||||
if (blogId > 0) {
|
||||
blogStore.blogApiType = 'UPDATE'
|
||||
await blogStore.queryAdminBlogById(route.params.id as number)
|
||||
blogStore.newBlog = blogStore.currentBlog
|
||||
} else {
|
||||
blogStore.blogApiType = 'ADD'
|
||||
blogStore.newBlog = blogStore.getEmptyBlog()
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* 校验博客
|
||||
*/
|
||||
const validateBlog = (): boolean => {
|
||||
if (blogStore.newBlog.content === '') {
|
||||
ElMessage.error('请输入博客内容')
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交表单事件
|
||||
*/
|
||||
const submitFormEvent = () => {
|
||||
// 表单校验
|
||||
formRef.value?.validate().then(async () => {
|
||||
if (validateBlog()) {
|
||||
await blogStore.handleBlogApi()
|
||||
await router.push('/admin/blog/article')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const onUploadImg = async (files: File[], callback) => {
|
||||
const loading = ElLoading.service({
|
||||
lock: true,
|
||||
text: '正在上传图片 请等待',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
|
||||
if (validateBlogImage(files)) {
|
||||
const result = await doUploadFile(fileServiceUrl, files[0], blogStore.blogImagePath, false)
|
||||
// 显示在markdown中
|
||||
// 注意这里需要是数组的形式
|
||||
const urlArray = []
|
||||
urlArray.push({
|
||||
url: `${serviceFileRootPath}${result.url.replace(/\\/g, '/')}`,
|
||||
alt: '暂无图片',
|
||||
title: files[0].name
|
||||
})
|
||||
callback(urlArray)
|
||||
}
|
||||
|
||||
loading.close()
|
||||
}
|
||||
|
||||
const backClick = () => {
|
||||
router.push('/admin/blog/article')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.admin-blog-detail {
|
||||
position: relative;
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.blog-form {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
.md-editor {
|
||||
height: 80vh;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,34 +0,0 @@
|
||||
<template>
|
||||
<div class="admin-module">
|
||||
<h3>{{ blogStore.currentBlog.title }}</h3>
|
||||
|
||||
<MdPreview editorId="blog-id" v-model="blogStore.currentBlog.content"/>
|
||||
|
||||
<div class="button-container">
|
||||
<el-button type="primary" @click="backClick">返回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted } from 'vue'
|
||||
import { useBlogStore } from '@/store/blog.ts'
|
||||
import { MdPreview } from 'md-editor-v3'
|
||||
import 'md-editor-v3/lib/style.css'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const blogStore = useBlogStore()
|
||||
|
||||
|
||||
onMounted(async () => {
|
||||
const blogId = route.params.id as number
|
||||
await blogStore.queryAdminBlogById(blogId)
|
||||
blogStore.newBlog = blogStore.currentBlog
|
||||
})
|
||||
|
||||
const backClick = () => {
|
||||
router.push('/admin/blog/article')
|
||||
}
|
||||
</script>
|
||||
@@ -1,69 +0,0 @@
|
||||
<template>
|
||||
<div class="admin-module">
|
||||
<el-table
|
||||
:data="blogInfo.blogVisitList"
|
||||
border stripe
|
||||
:header-cell-style="tableHeaderStyle()"
|
||||
:cell-style="tableCellStyle()"
|
||||
:row-style="tableRowStyle()"
|
||||
style="width: 100%"
|
||||
class="card-item">
|
||||
<el-table-column type="index" align="center" width="50" />
|
||||
<el-table-column prop="ip" label="IP" align="center" min-width="10%"/>
|
||||
<el-table-column prop="os" label="平台" align="center" min-width="10%" />
|
||||
<el-table-column prop="browser" label="浏览器" align="center" min-width="10%" />
|
||||
<el-table-column prop="uri" label="路径" align="center" min-width="10%" />
|
||||
<el-table-column prop="title" label="博客标题" align="center" min-width="10%" />
|
||||
<el-table-column prop="visitTime" label="访问时间" align="center" min-width="10%" />
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
v-model:current-page="blogInfo.pageInfo.currentPage"
|
||||
:page-size="blogInfo.pageInfo.pageSize"
|
||||
:total="blogInfo.pageInfo.totalSize"
|
||||
layout="total, prev, pager, next"
|
||||
@change="changePageClick"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, reactive } from 'vue'
|
||||
import { IBlogVisit } from '@/types/blog.ts'
|
||||
import { queryBlogVisitApi } from '@/apis/blog.ts'
|
||||
import { tableCellStyle, tableHeaderStyle, tableRowStyle } from 'vue3-common/utils/elUtil'
|
||||
|
||||
const blogInfo = reactive({
|
||||
blogVisitList: [] as IBlogVisit[],
|
||||
pageInfo: {
|
||||
currentPage: 1,
|
||||
pageSize: 15,
|
||||
totalSize: 1
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
await queryBlogVisit()
|
||||
})
|
||||
|
||||
/**
|
||||
* 切换页码
|
||||
* @param page 当前页码
|
||||
* @param pageSize 页码大小
|
||||
*/
|
||||
const changePageClick = async (page: number, pageSize: number) => {
|
||||
blogInfo.pageInfo.currentPage = page
|
||||
blogInfo.pageInfo.pageSize = pageSize
|
||||
await queryBlogVisit()
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看博客访问记录
|
||||
*/
|
||||
const queryBlogVisit = async () => {
|
||||
const { currentPage, pageSize } = blogInfo.pageInfo
|
||||
const result = await queryBlogVisitApi(currentPage, pageSize)
|
||||
blogInfo.blogVisitList = result.records
|
||||
blogInfo.pageInfo.totalSize = result.total
|
||||
}
|
||||
</script>
|
||||
@@ -1,13 +0,0 @@
|
||||
<template>
|
||||
<div class="admin-module">
|
||||
首页
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
@@ -1,62 +0,0 @@
|
||||
import { IRouteMetaConfig } from 'vue3-common/types'
|
||||
|
||||
export const adminMeta: IRouteMetaConfig = {
|
||||
'/admin/dashboard': {
|
||||
title: '首页',
|
||||
icon: 'admin-dashboard',
|
||||
order: 1,
|
||||
redirect: '/admin/dashboard/index'
|
||||
},
|
||||
'/admin/dashboard/index': {
|
||||
title: '首页',
|
||||
icon: ''
|
||||
},
|
||||
'/admin/blog': {
|
||||
title: '博客管理',
|
||||
icon: 'admin-blog',
|
||||
order: 2,
|
||||
redirect: '/admin/blog/article'
|
||||
},
|
||||
'/admin/blog/article': {
|
||||
title: '文章管理',
|
||||
icon: ''
|
||||
},
|
||||
'/admin/blog/category': {
|
||||
title: '类别管理',
|
||||
icon: ''
|
||||
},
|
||||
'/admin/blog/visit': {
|
||||
title: '访问记录',
|
||||
icon: ''
|
||||
},
|
||||
'/admin/blog/detail/:id': {
|
||||
title: '详细',
|
||||
icon: '',
|
||||
hidden: true
|
||||
},
|
||||
'/admin/blog/preview/:id': {
|
||||
title: '详细',
|
||||
icon: '',
|
||||
hidden: true
|
||||
},
|
||||
'/admin/quartz': {
|
||||
title: '定时任务',
|
||||
icon: 'admin-quartz',
|
||||
order: 3,
|
||||
redirect: '/admin/quartz/index'
|
||||
},
|
||||
'/admin/quartz/index': {
|
||||
title: '定时任务',
|
||||
icon: ''
|
||||
},
|
||||
'/admin/account': {
|
||||
title: '账号管理',
|
||||
icon: 'admin-account',
|
||||
order: 4,
|
||||
redirect: '/admin/account/index'
|
||||
},
|
||||
'/admin/account/index': {
|
||||
title: '账号管理',
|
||||
icon: ''
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
<template>
|
||||
<div class="admin-module">
|
||||
<el-table
|
||||
:data="quartzInfo.quartzList"
|
||||
border stripe
|
||||
:header-cell-style="tableHeaderStyle()"
|
||||
:cell-style="tableCellStyle()"
|
||||
:row-style="tableRowStyle()"
|
||||
style="width: 100%"
|
||||
class="card-item">
|
||||
<el-table-column type="index" align="center" width="50" />
|
||||
<el-table-column prop="group" label="任务组别" align="center" min-width="20%"/>
|
||||
<el-table-column label="任务类型" align="center" min-width="20%">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.type === 'EMAIL'" type="success">邮件提醒</el-tag>
|
||||
<el-tag v-else type="danger">未知</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="content" label="任务内容" align="center"/>
|
||||
<el-table-column label="执行时间" align="center" width="200">
|
||||
<template #default="scope">
|
||||
{{ scope.row.executeTime }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务状态" align="center" min-width="20%">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.status === 'NONE'" type="danger">不存在</el-tag>
|
||||
<el-tag v-else-if="scope.row.status === 'NORMAL'" type="primary">正常执行</el-tag>
|
||||
<el-tag v-else-if="scope.row.status === 'PAUSED'" type="warning">暂停</el-tag>
|
||||
<el-tag v-else-if="scope.row.status === 'COMPLETE'" type="success">完成</el-tag>
|
||||
<el-tag v-else-if="scope.row.status === 'ERROR'" type="danger">执行出错</el-tag>
|
||||
<el-tag v-else-if="scope.row.status === 'BLOCKED'" type="danger">阻塞</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, reactive } from 'vue'
|
||||
import { tableCellStyle, tableHeaderStyle, tableRowStyle } from 'vue3-common/utils/elUtil'
|
||||
import { IQuartzInfo } from '@/types/quartz'
|
||||
import { queryQuartzApi } from '@/apis/quartz'
|
||||
|
||||
const quartzInfo = reactive({
|
||||
quartzList: [] as IQuartzInfo[]
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
quartzInfo.quartzList = await queryQuartzApi()
|
||||
})
|
||||
</script>
|
||||
@@ -9,10 +9,10 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import CategoryCard from '@/components/Home/Anniversary/CategoryCard.vue'
|
||||
import CategoryCard from '@/components/Anniversary/CategoryCard.vue'
|
||||
import { onMounted } from 'vue'
|
||||
import { useAnniversaryStore } from '@/store/anniversary'
|
||||
import { anniversaryCategoryMap } from '@/utils/home/anniversaryUtil'
|
||||
import { useAnniversaryStore } from '@/store/anniversary.ts'
|
||||
import { anniversaryCategoryMap } from '@/utils/home/anniversaryUtil.ts'
|
||||
|
||||
const anniversaryStore = useAnniversaryStore()
|
||||
|
||||
@@ -55,13 +55,13 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useAnniversaryStore } from '@/store/anniversary'
|
||||
import { useAnniversaryStore } from '@/store/anniversary.ts'
|
||||
import { useAppStore } from '@/store/app.ts'
|
||||
import { FormRules } from 'element-plus'
|
||||
import { anniversaryRules } from '@/utils/element/elRules'
|
||||
import { anniversaryRules } from '@/utils/element/elRules.ts'
|
||||
import { onMounted, reactive, ref } from 'vue'
|
||||
import { commonElMessageBox } from 'vue3-common/utils/elUtil'
|
||||
import { anniversaryCategoryMap } from '@/utils/home/anniversaryUtil'
|
||||
import { anniversaryCategoryMap } from '@/utils/home/anniversaryUtil.ts'
|
||||
|
||||
const formRef = ref()
|
||||
const rules = reactive<FormRules>(anniversaryRules)
|
||||
@@ -14,9 +14,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import DraggableButton from '@/components/Mobile/DraggableButton.vue'
|
||||
import AnniversaryQuery from '@/components/Home/Anniversary/AnniversaryQuery.vue'
|
||||
import AnniversaryCard from '@/components/Home/Anniversary/AnniversaryCard.vue'
|
||||
import DraggableButton from '@/components/Common/DraggableButton.vue'
|
||||
import AnniversaryQuery from '@/components/Anniversary/AnniversaryQuery.vue'
|
||||
import AnniversaryCard from '@/components/Anniversary/AnniversaryCard.vue'
|
||||
import { useAnniversaryStore } from '@/store/anniversary.ts'
|
||||
import { onMounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
@@ -31,7 +31,7 @@ onMounted(async () => {
|
||||
const addClick = () => {
|
||||
anniversaryStore.anniversaryApiType = 'ADD'
|
||||
anniversaryStore.currentAnniversary = anniversaryStore.getEmptyAnniversary()
|
||||
router.push({ name: 'MobileHomeAnniversaryDetailId', params: { id: 0 } })
|
||||
router.push({ name: 'AnniversaryDetailId', params: { id: 0 } })
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -53,10 +53,10 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { AmountInput } from 'vue3-common'
|
||||
import { useAssetStore } from '@/store/asset'
|
||||
import { useAssetStore } from '@/store/asset.ts'
|
||||
import { useAppStore } from '@/store/app.ts'
|
||||
import { FormRules } from 'element-plus'
|
||||
import { assetRules } from '@/utils/element/elRules'
|
||||
import { assetRules } from '@/utils/element/elRules.ts'
|
||||
import { onMounted, reactive, ref } from 'vue'
|
||||
import { commonElMessageBox } from 'vue3-common/utils/elUtil'
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import AssetQuery from '@/components/Home/Asset/AssetQuery.vue'
|
||||
import AssetCard from '@/components/Home/Asset/AssetCard.vue'
|
||||
import DraggableButton from '@/components/Mobile/DraggableButton.vue'
|
||||
import AssetQuery from '@/components/Asset/AssetQuery.vue'
|
||||
import AssetCard from '@/components/Asset/AssetCard.vue'
|
||||
import DraggableButton from '@/components/Common/DraggableButton.vue'
|
||||
import { useAssetStore } from '@/store/asset.ts'
|
||||
import { onMounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
@@ -37,7 +37,7 @@ onMounted(async () => {
|
||||
const addClick = () => {
|
||||
assetStore.assetApiType = 'ADD'
|
||||
assetStore.currentAssetRecord = assetStore.getEmptyAsset()
|
||||
router.push({ name: 'MobileHomeAssetDetailId', params: { id: 0 } })
|
||||
router.push({ name: 'AssetDetailId', params: { id: 0 } })
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import BillQuery from '@/components/Home/Bill/BillQuery.vue'
|
||||
import BillStats from '@/components/Home/Bill/BillStats.vue'
|
||||
import BillChart from '@/components/Home/Bill/BillChart.vue'
|
||||
import BillQuery from '@/components/Bill/BillQuery.vue'
|
||||
import BillStats from '@/components/Bill/BillStats.vue'
|
||||
import BillChart from '@/components/Bill/BillChart.vue'
|
||||
import { onMounted } from 'vue'
|
||||
import { useBillStore } from '@/store/bill.ts'
|
||||
|
||||
@@ -32,5 +32,5 @@ onMounted(async () => {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@use "@/styles/home/bill.mobile.module.scss";
|
||||
@use "@/styles/home/bill.mobile.module";
|
||||
</style>
|
||||
@@ -10,9 +10,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import BillQuery from '@/components/Home/Bill/BillQuery.vue'
|
||||
import BillCalendar from '@/components/Home/Bill/BillCalendar.vue'
|
||||
import BillDailyList from '@/components/Home/Bill/BillDailyList.vue'
|
||||
import BillQuery from '@/components/Bill/BillQuery.vue'
|
||||
import BillCalendar from '@/components/Bill/BillCalendar.vue'
|
||||
import BillDailyList from '@/components/Bill/BillDailyList.vue'
|
||||
import { onMounted } from 'vue'
|
||||
import { useBillStore } from '@/store/bill.ts'
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
@@ -28,10 +28,10 @@ onMounted(async () => {
|
||||
const addNewBillRecordClick = () => {
|
||||
billStore.billApiType = 'ADD'
|
||||
billStore.currentBillRecord = billStore.getEmptyBillRecord()
|
||||
router.push({ name: 'MobileHomeBillDetailId', params: { id: 0 } })
|
||||
router.push({ name: 'BillDetailId', params: { id: 0 } })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@use "@/styles/home/bill.mobile.module.scss";
|
||||
@use "@/styles/home/bill.mobile.module";
|
||||
</style>
|
||||
@@ -106,13 +106,13 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { UploadImage, AmountInput } from 'vue3-common'
|
||||
import { useBillStore } from '@/store/bill'
|
||||
import { useBillStore } from '@/store/bill.ts'
|
||||
import { useAppStore } from '@/store/app.ts'
|
||||
import { Location, Document } from '@element-plus/icons-vue'
|
||||
import { FormRules } from 'element-plus'
|
||||
import { billRecordRules } from '@/utils/element/elRules'
|
||||
import { billRecordRules } from '@/utils/element/elRules.ts'
|
||||
import { nextTick, onMounted, reactive, ref } from 'vue'
|
||||
import { IBillCategory } from '@/types/bill'
|
||||
import { IBillCategory } from '@/types/bill.ts'
|
||||
import { commonElMessageBox } from 'vue3-common/utils/elUtil'
|
||||
import { fileServiceUrl, serviceFileRootPath } from '@/utils'
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import BillBook from '@/components/Home/Bill/BillBook.vue'
|
||||
import BillPay from '@/components/Home/Bill/BillPay.vue'
|
||||
import BillCategory from '@/components/Home/Bill/BillCategory.vue'
|
||||
import BillBook from '@/components/Bill/BillBook.vue'
|
||||
import BillPay from '@/components/Bill/BillPay.vue'
|
||||
import BillCategory from '@/components/Bill/BillCategory.vue'
|
||||
import { ref } from 'vue'
|
||||
|
||||
const activeName = ref('book')
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@use "@/styles/home/bill.mobile.module.scss";
|
||||
@use "@/styles/home/bill.mobile.module";
|
||||
</style>
|
||||
@@ -51,10 +51,10 @@ const changeDateEvent = async (value: Date) => {
|
||||
*/
|
||||
const viewBlogClick = async (index: number) => {
|
||||
const blogId = blogStore.blogList[index].id
|
||||
await router.push({ name: 'MobileHomeBlogDetailId', params: { id: blogId } })
|
||||
await router.push({ name: 'BlogDetailId', params: { id: blogId } })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@use "@/styles/blog/blog.archive.module.scss";
|
||||
@use "@/styles/blog/blog.archive.module";
|
||||
</style>
|
||||
@@ -35,10 +35,10 @@ onMounted(() => {
|
||||
*/
|
||||
const viewBlogCategoryClick = async (name: string) => {
|
||||
appStore.isShowMobileBack = true
|
||||
await router.push({ name: 'MobileHomeBlogCategoryName', params: { name } })
|
||||
await router.push({ name: 'BlogCategoryName', params: { name } })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@use "@/styles/blog/blog.category.module.scss";
|
||||
@use "@/styles/blog/blog.category.module";
|
||||
</style>
|
||||
@@ -37,5 +37,5 @@ const viewBlogClick = async (index: number) => {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@use "@/styles/blog/blog.category.detail.module.scss";
|
||||
@use "@/styles/blog/blog.category.detail.module";
|
||||
</style>
|
||||
@@ -51,5 +51,5 @@ onMounted(async () => {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@use "@/styles/blog/blog.detail.module.scss";
|
||||
@use "@/styles/blog/blog.detail.module";
|
||||
</style>
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import BlogLabel from '@/components/Blog/Content/BlogLabel.vue'
|
||||
import ArriveBottom from '@/components/Mobile/ArriveButton.vue'
|
||||
import ArriveBottom from '@/components/Common/ArriveButton.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { onBeforeUnmount, onMounted, ref } from 'vue'
|
||||
import { useBlogStore } from '@/store/blog.ts'
|
||||
@@ -55,7 +55,7 @@ onBeforeUnmount(() => {
|
||||
*/
|
||||
const readBlogClick = async (index: number) => {
|
||||
const blogId = blogStore.blogList[index].id
|
||||
await router.push({ name: 'MobileHomeBlogDetailId', params: { id: blogId } })
|
||||
await router.push({ name: 'BlogDetailId', params: { id: blogId } })
|
||||
}
|
||||
|
||||
const handleScroll = () => {
|
||||
@@ -72,5 +72,5 @@ const handleScroll = () => {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@use "@/styles/blog/blog.overview.module.scss";
|
||||
@use "@/styles/blog/blog.overview.module";
|
||||
</style>
|
||||
@@ -24,11 +24,11 @@
|
||||
import { useFoodStore } from '@/store/food.ts'
|
||||
import { useAppStore } from '@/store/app.ts'
|
||||
import { useRoute } from 'vue-router'
|
||||
import FoodBasicData from '@/components/Home/Food/Data/FoodBasicData.vue'
|
||||
import FoodMaterialData from '@/components/Home/Food/Data/FoodMaterialData.vue'
|
||||
import FoodStepData from '@/components/Home/Food/Data/FoodStepData.vue'
|
||||
import FoodOthersData from '@/components/Home/Food/Data/FoodOthersData.vue'
|
||||
import FoodRecordData from '@/components/Home/Food/Data/FoodRecordData.vue'
|
||||
import FoodBasicData from '@/components/Food/Data/FoodBasicData.vue'
|
||||
import FoodMaterialData from '@/components/Food/Data/FoodMaterialData.vue'
|
||||
import FoodStepData from '@/components/Food/Data/FoodStepData.vue'
|
||||
import FoodOthersData from '@/components/Food/Data/FoodOthersData.vue'
|
||||
import FoodRecordData from '@/components/Food/Data/FoodRecordData.vue'
|
||||
import { onMounted } from 'vue'
|
||||
|
||||
const foodStore = useFoodStore()
|
||||
@@ -42,5 +42,5 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@use "@/styles/home/life.detail.module.scss";
|
||||
@use "@/styles/home/life.detail.module";
|
||||
</style>
|
||||
@@ -16,9 +16,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import FoodQuery from '@/components/Home/Food/FoodQuery.vue'
|
||||
import FoodCard from '@/components/Home/Food/FoodCard.vue'
|
||||
import ArriveBottom from '@/components/Mobile/ArriveButton.vue'
|
||||
import FoodQuery from '@/components/Food/FoodQuery.vue'
|
||||
import FoodCard from '@/components/Food/FoodCard.vue'
|
||||
import ArriveBottom from '@/components/Common/ArriveButton.vue'
|
||||
import { useFoodStore } from '@/store/food.ts'
|
||||
import { onBeforeUnmount, onMounted, ref } from 'vue'
|
||||
|
||||
@@ -54,5 +54,5 @@ const handleScroll = () => {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@use "@/styles/home/food.mobile.module.scss";
|
||||
@use "@/styles/home/food.mobile.module";
|
||||
</style>
|
||||
@@ -9,9 +9,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import FoodStats from '@/components/Home/Food/FoodStats.vue'
|
||||
import FoodCalendar from '@/components/Home/Food/FoodCalendar.vue'
|
||||
import DraggableButton from '@/components/Mobile/DraggableButton.vue'
|
||||
import FoodStats from '@/components/Food/FoodStats.vue'
|
||||
import FoodCalendar from '@/components/Food/FoodCalendar.vue'
|
||||
import DraggableButton from '@/components/Common/DraggableButton.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useFoodStore } from '@/store/food.ts'
|
||||
import { onMounted } from 'vue'
|
||||
@@ -26,10 +26,10 @@ onMounted(async () => {
|
||||
const addClick = () => {
|
||||
foodStore.foodRecordApiType = 'ADD'
|
||||
foodStore.currentFoodRecord = foodStore.getEmptyFoodRecord()
|
||||
router.push({ name: 'MobileHomeFoodRecordForm' })
|
||||
router.push({ name: 'FoodRecordForm' })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@use "@/styles/home/food.mobile.module.scss";
|
||||
@use "@/styles/home/food.mobile.module";
|
||||
</style>
|
||||
@@ -55,7 +55,7 @@ import { UploadImage } from 'vue3-common'
|
||||
import { useFoodStore } from '@/store/food.ts'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { FormRules } from 'element-plus'
|
||||
import { foodRecordRules } from '@/utils/element/elRules'
|
||||
import { foodRecordRules } from '@/utils/element/elRules.ts'
|
||||
import { fileServiceUrl, serviceFileRootPath } from '@/utils'
|
||||
import { commonElMessageBox } from 'vue3-common/utils/elUtil'
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
<template>
|
||||
<div class="date-view common-view">
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { usePlanStore } from '@/store/plan.ts'
|
||||
import { onMounted } from 'vue'
|
||||
|
||||
const planStore = usePlanStore()
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
})
|
||||
|
||||
const addClick = () => {
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -1,52 +0,0 @@
|
||||
<template>
|
||||
<div class="common-view plan-view">
|
||||
<div class="body-container">
|
||||
<div class="left-container">
|
||||
<plan-stats />
|
||||
|
||||
<plan-calendar />
|
||||
</div>
|
||||
|
||||
<div class="right-container">
|
||||
<plan-query />
|
||||
|
||||
<plan-list />
|
||||
</div>
|
||||
|
||||
<el-button type="primary" :icon="Plus" circle
|
||||
@click="addNewPlanClick" class="add-new" />
|
||||
</div>
|
||||
|
||||
<plan-dialog />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import PlanCalendar from '@/components/Home/Plan/PlanCalendar.vue'
|
||||
import PlanStats from '@/components/Home/Plan/PlanStats.vue'
|
||||
import PlanList from '@/components/Home/Plan/PlanList.vue'
|
||||
import PlanQuery from '@/components/Home/Plan/PlanQuery.vue'
|
||||
import PlanDialog from '@/components/Home/Plan/PlanDialog.vue'
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import { usePlanStore } from '@/store/plan.ts'
|
||||
import { onMounted } from 'vue'
|
||||
|
||||
const planStore = usePlanStore()
|
||||
|
||||
onMounted(() => {
|
||||
planStore.refreshInfo()
|
||||
})
|
||||
|
||||
const addNewPlanClick = () => {
|
||||
planStore.planApiType = 'ADD'
|
||||
planStore.planDialog = {
|
||||
title: '新增计划',
|
||||
visible: true,
|
||||
data: planStore.getEmptyPlan()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@use "@/styles/home/plan.module.scss";
|
||||
</style>
|
||||
@@ -22,59 +22,59 @@
|
||||
<div class="module-list">
|
||||
<module-card icon="iconfont icon-fenlei" color="#00CED1"
|
||||
title="博客文章" sub-title="分享学习点滴"
|
||||
router="/mobile-home/blog/overview"/>
|
||||
router="/blog/overview"/>
|
||||
|
||||
<module-card icon="iconfont icon-zhangdan" color="#FFCC00"
|
||||
title="账单记录" sub-title="收支一目了然"
|
||||
router="/mobile-home/bill/data"/>
|
||||
router="/bill/data"/>
|
||||
|
||||
<module-card icon="iconfont icon-caipu" color="#006400"
|
||||
title="美食记录" sub-title="品味人间烟火"
|
||||
router="/mobile-home/food/recipe"/>
|
||||
router="/food/recipe"/>
|
||||
|
||||
<module-card icon="iconfont icon-jingdian" color="#FF9966"
|
||||
title="旅行记录" sub-title="足迹遍及四方"
|
||||
router="/mobile-home/travel/spot"/>
|
||||
router="/travel/spot"/>
|
||||
|
||||
<module-card icon="iconfont icon-wupin" color="#19107E"
|
||||
title="物品记录" sub-title="收纳生活琐碎"
|
||||
router="/mobile-home/product/list"/>
|
||||
router="/product/list"/>
|
||||
|
||||
<module-card icon="iconfont icon-paiban" color="#9933FF"
|
||||
title="日程安排" sub-title="规划每日时光"
|
||||
router="/mobile-home/plan/calendar"/>
|
||||
router="/plan/calendar"/>
|
||||
|
||||
<module-card icon="iconfont icon-richeng" color="#228B22"
|
||||
title="纪念日" sub-title="铭记重要时刻"
|
||||
router="/mobile-home/anniversary/list"/>
|
||||
router="/anniversary/list"/>
|
||||
|
||||
<module-card icon="iconfont icon-yuejing" color="#DE3163"
|
||||
title="月经记录" sub-title="关注健康周期"
|
||||
router="/mobile-home/period/calendar"/>
|
||||
router="/period/calendar"/>
|
||||
|
||||
<module-card icon="iconfont icon-riji" color="#FF69B4"
|
||||
title="时光手账" sub-title="书写流动岁月"
|
||||
router="/mobile-home/journal/record"/>
|
||||
router="/journal/record"/>
|
||||
|
||||
<module-card icon="iconfont icon-jixiao" color="#003366"
|
||||
title="绩效统计" sub-title="绩刻拼搏印记 "
|
||||
router="/mobile-home/kpi/record"/>
|
||||
router="/kpi/record"/>
|
||||
|
||||
<module-card icon="iconfont icon-zichan" color="#FFA500"
|
||||
title="家庭资产" sub-title="统筹全家财富"
|
||||
router="/mobile-home/asset/list"/>
|
||||
router="/asset/list"/>
|
||||
|
||||
<module-card icon="iconfont icon-zhangben" color="#388E3C"
|
||||
title="家庭账本" sub-title="守护家庭财富"
|
||||
router="/mobile-home/ledger/list"/>
|
||||
router="/ledger/list"/>
|
||||
|
||||
<module-card icon="iconfont icon-ai-password" color="#4361EE"
|
||||
title="密码管家" sub-title="守护数字安全"
|
||||
router="/mobile-home/password/list"/>
|
||||
router="/password/list"/>
|
||||
|
||||
<module-card icon="iconfont icon-fuwuqi" color="#FF6B6B"
|
||||
title="服务监控" sub-title="掌握系统健康"
|
||||
router="/mobile-home/server/monitor"/>
|
||||
router="/server/monitor"/>
|
||||
</div>
|
||||
|
||||
<!-- <div class="note-container">-->
|
||||
@@ -91,8 +91,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import WeatherTimeCard from '@/components/Mobile/WeatherTimeCard.vue'
|
||||
import ModuleCard from '@/components/Home/ModuleCard.vue'
|
||||
import WeatherTimeCard from '@/components/Common/WeatherTimeCard.vue'
|
||||
import ModuleCard from '@/components/ModuleCard.vue'
|
||||
import { useAppStore } from '@/store/app'
|
||||
import { getAssetsImageFile } from '@/utils'
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
<template>
|
||||
<div class="food-view common-view">
|
||||
<div class="body-container">
|
||||
<div class="left-container">
|
||||
<food-stats />
|
||||
|
||||
<food-recipe-list />
|
||||
</div>
|
||||
|
||||
<div class="right-container">
|
||||
<food-query />
|
||||
|
||||
<food-daily-list v-if="foodStore.queryDateType === 'year'" />
|
||||
<food-calendar v-if="foodStore.queryDateType === 'month'" />
|
||||
|
||||
<el-button v-if="isLargeScreen()"
|
||||
type="primary" :icon="Plus" circle
|
||||
@click="addFoodWorkClick" class="add-new" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<food-dialog />
|
||||
<food-material-dialog />
|
||||
<food-step-dialog />
|
||||
<food-record-dialog />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import FoodQuery from '@/components/Home/Food/FoodQuery.vue'
|
||||
import FoodStats from '@/components/Home/Food/FoodStats.vue'
|
||||
import FoodRecipeList from '@/components/Home/Food/FoodRecipeList.vue'
|
||||
import FoodCalendar from '@/components/Home/Food/FoodCalendar.vue'
|
||||
import FoodDailyList from '@/components/Home/Food/FoodDailyList.vue'
|
||||
import FoodDialog from '@/components/Home/Food/FoodDialog.vue'
|
||||
import FoodMaterialDialog from '@/components/Home/Food/Form/FoodMaterialDialog.vue'
|
||||
import FoodStepDialog from '@/components/Home/Food/Form/FoodStepDialog.vue'
|
||||
import FoodRecordDialog from '@/components/Home/Food/Form/FoodRecordDialog.vue'
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import { onMounted } from 'vue'
|
||||
import { useFoodStore } from '@/store/food.ts'
|
||||
import { isLargeScreen } from '@/utils'
|
||||
|
||||
const foodStore = useFoodStore()
|
||||
|
||||
onMounted(async () => {
|
||||
await foodStore.refreshInfo()
|
||||
})
|
||||
|
||||
const addFoodWorkClick = () => {
|
||||
foodStore.foodRecordApiType = 'ADD'
|
||||
foodStore.foodRecordDialog = {
|
||||
title: '新增记录',
|
||||
visible: true,
|
||||
data: foodStore.getEmptyFoodRecord()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@use "@/styles/home/food.module.scss";
|
||||
</style>
|
||||
@@ -1,50 +0,0 @@
|
||||
<template>
|
||||
<div class="life-detail">
|
||||
<span class="title">{{ foodStore.currentFoodRecipe.name }}</span>
|
||||
|
||||
<section>
|
||||
<div class="info-container">
|
||||
<food-basic-data/>
|
||||
|
||||
<food-material-data/>
|
||||
|
||||
<food-step-data/>
|
||||
|
||||
<food-others-data/>
|
||||
</div>
|
||||
|
||||
<div class="record-container card-item">
|
||||
<food-record-data/>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<el-button type="primary" class="back-button" @click="backClick">返回</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useFoodStore } from '@/store/food.ts'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import FoodBasicData from '@/components/Home/Food/Data/FoodBasicData.vue'
|
||||
import FoodMaterialData from '@/components/Home/Food/Data/FoodMaterialData.vue'
|
||||
import FoodStepData from '@/components/Home/Food/Data/FoodStepData.vue'
|
||||
import FoodOthersData from '@/components/Home/Food/Data/FoodOthersData.vue'
|
||||
import FoodRecordData from '@/components/Home/Food/Data/FoodRecordData.vue'
|
||||
import { onMounted } from 'vue'
|
||||
|
||||
const foodStore = useFoodStore()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
onMounted(() => {
|
||||
foodStore.queryFoodRecipe(route.params.id as number)
|
||||
})
|
||||
|
||||
const backClick = () => {
|
||||
router.push({ path: '/home/life/food' })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@use "@/styles/home/life.detail.module.scss";
|
||||
</style>
|
||||
@@ -1,58 +0,0 @@
|
||||
<template>
|
||||
<div class="travel-view common-view">
|
||||
<div class="body-container">
|
||||
<div class="left-container">
|
||||
<travel-stats />
|
||||
|
||||
<travel-spot-list />
|
||||
</div>
|
||||
|
||||
<div class="right-container">
|
||||
<travel-query />
|
||||
|
||||
<travel-daily-list v-if="travelStore.queryDateType === 'year'" />
|
||||
<travel-calendar v-if="travelStore.queryDateType === 'month'" />
|
||||
|
||||
<el-button v-if="isLargeScreen()"
|
||||
type="primary" :icon="Plus" circle
|
||||
@click="addTravelRecordClick" class="add-new" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<travel-dialog />
|
||||
<travel-record-dialog />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import TravelQuery from '@/components/Home/Travel/TravelQuery.vue'
|
||||
import TravelStats from '@/components/Home/Travel/TravelStats.vue'
|
||||
import TravelSpotList from '@/components/Home/Travel/TravelSpotList.vue'
|
||||
import TravelCalendar from '@/components/Home/Travel/TravelCalendar.vue'
|
||||
import TravelDailyList from '@/components/Home/Travel/TravelDailyList.vue'
|
||||
import TravelRecordDialog from '@/components/Home/Travel/Form/TravelRecordDialog.vue'
|
||||
import TravelDialog from '@/components/Home/Travel/TravelDialog.vue'
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import { onMounted } from 'vue'
|
||||
import { useTravelStore } from '@/store/travel.ts'
|
||||
import { isLargeScreen } from '@/utils'
|
||||
|
||||
const travelStore = useTravelStore()
|
||||
|
||||
onMounted(async () => {
|
||||
await travelStore.refreshInfo()
|
||||
})
|
||||
|
||||
const addTravelRecordClick = () => {
|
||||
travelStore.travelRecordApiType = 'ADD'
|
||||
travelStore.travelRecordDialog = {
|
||||
title: '新增记录',
|
||||
visible: true,
|
||||
data: travelStore.getEmptyTravelRecord()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@use "@/styles/home/travel.module.scss";
|
||||
</style>
|
||||
@@ -1,44 +0,0 @@
|
||||
<template>
|
||||
<div class="life-detail">
|
||||
<span class="title">{{ travelStore.currentTravelSpot.name }}</span>
|
||||
|
||||
<section>
|
||||
<div class="info-container">
|
||||
<travel-basic-data/>
|
||||
|
||||
<travel-guide-data/>
|
||||
</div>
|
||||
|
||||
<div class="record-container card-item">
|
||||
<travel-record-data/>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<el-button type="primary" class="back-button" @click="backClick">返回</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useTravelStore } from '@/store/travel.ts'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import TravelBasicData from '@/components/Home/Travel/Data/TravelBasicData.vue'
|
||||
import TravelGuideData from '@/components/Home/Travel/Data/TravelGuideData.vue'
|
||||
import TravelRecordData from '@/components/Home/Travel/Data/TravelRecordData.vue'
|
||||
import { onMounted } from 'vue'
|
||||
|
||||
const travelStore = useTravelStore()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
onMounted(() => {
|
||||
travelStore.queryTravelSpot(route.params.id as number)
|
||||
})
|
||||
|
||||
const backClick = () => {
|
||||
router.push({ path: '/home/life/travel' })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@use "@/styles/home/life.detail.module.scss";
|
||||
</style>
|
||||
@@ -1,63 +0,0 @@
|
||||
import { IRouteMetaConfig } from 'vue3-common/types'
|
||||
|
||||
export const homeMeta: IRouteMetaConfig = {
|
||||
'/home/property': {
|
||||
title: '家庭资产',
|
||||
icon: 'home-property',
|
||||
order: 1,
|
||||
redirect: '/home/property/bill'
|
||||
},
|
||||
'/home/property/bill': {
|
||||
title: '收支记录',
|
||||
icon: ''
|
||||
},
|
||||
'/home/life': {
|
||||
title: '生活记录',
|
||||
icon: 'home-life',
|
||||
order: 2,
|
||||
redirect: '/home/life/food'
|
||||
},
|
||||
'/home/life/food': {
|
||||
title: '美食记录',
|
||||
icon: ''
|
||||
},
|
||||
'/home/life/food/:id': {
|
||||
title: '美食展示',
|
||||
icon: '',
|
||||
hidden: true
|
||||
},
|
||||
'/home/life/travel': {
|
||||
title: '旅行记录',
|
||||
icon: ''
|
||||
},
|
||||
'/home/life/travel/:id': {
|
||||
title: '旅行展示',
|
||||
icon: '',
|
||||
hidden: true
|
||||
},
|
||||
'/home/calendar': {
|
||||
title: '时程印记',
|
||||
icon: 'home-calendar',
|
||||
order: 3,
|
||||
redirect: '/home/calendar/plan'
|
||||
},
|
||||
'/home/calendar/plan': {
|
||||
title: '日程计划',
|
||||
icon: ''
|
||||
},
|
||||
'/home/calendar/date': {
|
||||
title: '纪念日',
|
||||
icon: ''
|
||||
},
|
||||
'/home/others': {
|
||||
title: '友情链接',
|
||||
icon: 'home-link',
|
||||
order: 4,
|
||||
redirect: '/home/others/admin'
|
||||
},
|
||||
'/home/others/blog': {
|
||||
title: '个人博客',
|
||||
icon: '',
|
||||
redirect: '/blog'
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
</script>
|
||||
@@ -1,56 +0,0 @@
|
||||
<template>
|
||||
<div class="bill-view common-view">
|
||||
<div class="body-container">
|
||||
<div class="left-container">
|
||||
<bill-stats />
|
||||
|
||||
<bill-chart />
|
||||
</div>
|
||||
|
||||
<div class="right-container">
|
||||
<bill-query/>
|
||||
|
||||
<bill-daily-list v-if="billStore.billDateType === 'year'"/>
|
||||
<bill-calendar v-if="billStore.billDateType === 'month'" />
|
||||
</div>
|
||||
|
||||
<el-button v-if="isLargeScreen()"
|
||||
type="primary" :icon="Plus" circle
|
||||
@click="addNewBillRecordClick" class="add-new" />
|
||||
</div>
|
||||
|
||||
<bill-dialog />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import BillQuery from '@/components/Home/Bill/BillQuery.vue'
|
||||
import BillStats from '@/components/Home/Bill/BillStats.vue'
|
||||
import BillChart from '@/components/Home/Bill/BillChart.vue'
|
||||
import BillDailyList from '@/components/Home/Bill/BillDailyList.vue'
|
||||
import BillCalendar from '@/components/Home/Bill/BillCalendar.vue'
|
||||
import BillDialog from '@/components/Home/Bill/BillDialog.vue'
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import { onMounted } from 'vue'
|
||||
import { useBillStore } from '@/store/bill.ts'
|
||||
import { isLargeScreen } from '@/utils'
|
||||
|
||||
const billStore = useBillStore()
|
||||
|
||||
onMounted(async () => {
|
||||
await billStore.refreshInfo()
|
||||
})
|
||||
|
||||
const addNewBillRecordClick = () => {
|
||||
billStore.billApiType = 'ADD'
|
||||
billStore.billDialog = {
|
||||
title: '新增账单',
|
||||
visible: true,
|
||||
data: billStore.getEmptyBillRecord()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@use "@/styles/home/bill.module.scss";
|
||||
</style>
|
||||
@@ -99,7 +99,7 @@ import { Location } from '@element-plus/icons-vue'
|
||||
import { useJournalStore } from '@/store/journal.ts'
|
||||
import { useAppStore } from '@/store/app.ts'
|
||||
import { FormRules } from 'element-plus'
|
||||
import { journalRules } from '@/utils/element/elRules'
|
||||
import { journalRules } from '@/utils/element/elRules.ts'
|
||||
import { onMounted, reactive, ref } from 'vue'
|
||||
import { commonElMessageBox } from 'vue3-common/utils/elUtil'
|
||||
import { fileServiceUrl, serviceFileRootPath } from '@/utils'
|
||||
@@ -7,8 +7,8 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import JournalCalendar from '@/components/Home/Journal/JournalCalendar.vue'
|
||||
import DraggableButton from '@/components/Mobile/DraggableButton.vue'
|
||||
import JournalCalendar from '@/components/Journal/JournalCalendar.vue'
|
||||
import DraggableButton from '@/components/Common/DraggableButton.vue'
|
||||
import { useJournalStore } from '@/store/journal.ts'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { onMounted } from 'vue'
|
||||
@@ -27,7 +27,7 @@ onMounted(async () => {
|
||||
const addClick = () => {
|
||||
journalStore.journalApiType = 'ADD'
|
||||
journalStore.currentJournal = journalStore.getEmptyJournal()
|
||||
router.push({ name: 'MobileHomeJournalDetailId', params: { id: 0 } })
|
||||
router.push({ name: 'JournalDetailId', params: { id: 0 } })
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import JournalCard from '@/components/Home/Journal/JournalCard.vue'
|
||||
import JournalCard from '@/components/Journal/JournalCard.vue'
|
||||
import { useJournalStore } from '@/store/journal.ts'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { formatDate, getCurrentYear, getStartEndDate } from 'vue3-common/utils/dateUtil'
|
||||
@@ -56,7 +56,7 @@
|
||||
import { useKpiStore } from '@/store/kpi.ts'
|
||||
import { useAppStore } from '@/store/app.ts'
|
||||
import { FormRules } from 'element-plus'
|
||||
import { kpiRules } from '@/utils/element/elRules'
|
||||
import { kpiRules } from '@/utils/element/elRules.ts'
|
||||
import { onMounted, reactive, ref } from 'vue'
|
||||
import { commonElMessageBox } from 'vue3-common/utils/elUtil'
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import KpiCalendar from '@/components/Home/kpi/KpiCalendar.vue'
|
||||
import DraggableButton from '@/components/Mobile/DraggableButton.vue'
|
||||
import KpiCalendar from '@/components/kpi/KpiCalendar.vue'
|
||||
import DraggableButton from '@/components/Common/DraggableButton.vue'
|
||||
import { useKpiStore } from '@/store/kpi.ts'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { computed, onMounted } from 'vue'
|
||||
@@ -36,7 +36,7 @@ const totalPrice = computed(() => {
|
||||
const addClick = () => {
|
||||
kpiStore.kpiApiType = 'ADD'
|
||||
kpiStore.currentKpi = kpiStore.getEmptyKpi()
|
||||
router.push({ name: 'MobileHomeKpiDetailId', params: { id: 0 } })
|
||||
router.push({ name: 'KpiDetailId', params: { id: 0 } })
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -74,10 +74,10 @@
|
||||
<script lang="ts" setup>
|
||||
import { UploadImage } from 'vue3-common'
|
||||
import { AmountInput } from 'vue3-common'
|
||||
import { useLedgerStore } from '@/store/ledger'
|
||||
import { useLedgerStore } from '@/store/ledger.ts'
|
||||
import { useAppStore } from '@/store/app.ts'
|
||||
import { FormRules } from 'element-plus'
|
||||
import { ledgerRules } from '@/utils/element/elRules'
|
||||
import { ledgerRules } from '@/utils/element/elRules.ts'
|
||||
import { onMounted, reactive, ref } from 'vue'
|
||||
import { commonElMessageBox } from 'vue3-common/utils/elUtil'
|
||||
import { fileServiceUrl, serviceFileRootPath } from '@/utils'
|
||||
@@ -19,9 +19,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import LedgerQuery from '@/components/Home/Ledger/LedgerQuery.vue'
|
||||
import LedgerCard from '@/components/Home/Ledger/LedgerCard.vue'
|
||||
import DraggableButton from '@/components/Mobile/DraggableButton.vue'
|
||||
import LedgerQuery from '@/components/Ledger/LedgerQuery.vue'
|
||||
import LedgerCard from '@/components/Ledger/LedgerCard.vue'
|
||||
import DraggableButton from '@/components/Common/DraggableButton.vue'
|
||||
import { useLedgerStore } from '@/store/ledger.ts'
|
||||
import { onMounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
@@ -38,7 +38,7 @@ const addClick = () => {
|
||||
ledgerStore.ledgerApiType = 'ADD'
|
||||
ledgerStore.currentLedgerRecord = ledgerStore.getEmptyLedgerRecord()
|
||||
ledgerStore.currentLedgerRecord.book = ledgerStore.queryInfo.book
|
||||
router.push({ name: 'MobileHomeLedgerDetailId', params: { id: 0 } })
|
||||
router.push({ name: 'LedgerDetailId', params: { id: 0 } })
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import CommonLogin from '@/components/Home/Login/CommonLogin.vue'
|
||||
import PhoneLogin from '@/components/Home/Login/PhoneLogin.vue'
|
||||
import EmailLogin from '@/components/Home/Login/EmailLogin.vue'
|
||||
import CommonLogin from '@/components/Login/CommonLogin.vue'
|
||||
import PhoneLogin from '@/components/Login/PhoneLogin.vue'
|
||||
import EmailLogin from '@/components/Login/EmailLogin.vue'
|
||||
import { useAuthStore } from '@/store/auth'
|
||||
import { onMounted, onUnmounted, reactive } from 'vue'
|
||||
|
||||
|
||||
@@ -1,272 +1,272 @@
|
||||
import type { IRouteMetaConfig } from 'vue3-common/types'
|
||||
|
||||
export const mobileHomeMeta: IRouteMetaConfig = {
|
||||
'/mobile-home/blog': {
|
||||
'/blog': {
|
||||
title: '博客记录',
|
||||
icon: '',
|
||||
order: 1,
|
||||
redirect: '/mobile-home/blog/overview'
|
||||
redirect: '/blog/overview'
|
||||
},
|
||||
'/mobile-home/blog/overview': {
|
||||
'/blog/overview': {
|
||||
title: '博客列表',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/blog/category': {
|
||||
'/blog/category': {
|
||||
title: '博客分类',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/blog/category/:name': {
|
||||
'/blog/category/:name': {
|
||||
title: '博客分类',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/blog/archive': {
|
||||
'/blog/archive': {
|
||||
title: '博客归档',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/blog/detail/:id': {
|
||||
'/blog/detail/:id': {
|
||||
title: '博客内容',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/bill': {
|
||||
'/bill': {
|
||||
title: '收支记录',
|
||||
icon: 'home-bill',
|
||||
order: 2,
|
||||
redirect: '/mobile-home/bill/data'
|
||||
redirect: '/bill/data'
|
||||
},
|
||||
'/mobile-home/bill/data': {
|
||||
'/bill/data': {
|
||||
title: '账单数据',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/bill/chart': {
|
||||
'/bill/chart': {
|
||||
title: '账单图表',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/bill/detail/:id': {
|
||||
'/bill/detail/:id': {
|
||||
title: '账单内容',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/bill/setting': {
|
||||
'/bill/setting': {
|
||||
title: '账单设置',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/food': {
|
||||
'/food': {
|
||||
title: '美食记录',
|
||||
icon: 'home-food',
|
||||
order: 3,
|
||||
redirect: '/mobile-home/food/recipe'
|
||||
redirect: '/food/recipe'
|
||||
},
|
||||
'/mobile-home/food/recipe': {
|
||||
'/food/recipe': {
|
||||
title: '美食菜谱',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/food/record': {
|
||||
'/food/record': {
|
||||
title: '美食记录',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/food/detail/id': {
|
||||
'/food/detail/id': {
|
||||
title: '菜谱内容',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/food/recordForm': {
|
||||
'/food/recordForm': {
|
||||
title: '记录表单',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/travel': {
|
||||
'/travel': {
|
||||
title: '旅行记录',
|
||||
icon: 'home-food',
|
||||
order: 4,
|
||||
redirect: '/mobile-home/travel/spot'
|
||||
redirect: '/travel/spot'
|
||||
},
|
||||
'/mobile-home/travel/spot': {
|
||||
'/travel/spot': {
|
||||
title: '旅行景点',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/travel/record': {
|
||||
'/travel/record': {
|
||||
title: '旅行记录',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/travel/detail/id': {
|
||||
'/travel/detail/id': {
|
||||
title: '旅行内容',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/travel/spotForm': {
|
||||
'/travel/spotForm': {
|
||||
title: '景点表单',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/travel/recordForm': {
|
||||
'/travel/recordForm': {
|
||||
title: '记录表单',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/plan': {
|
||||
'/plan': {
|
||||
title: '时光日程',
|
||||
icon: 'home-calendar',
|
||||
order: 5,
|
||||
redirect: '/mobile-home/plan/calendar'
|
||||
redirect: '/plan/calendar'
|
||||
},
|
||||
'/mobile-home/plan/calendar': {
|
||||
'/plan/calendar': {
|
||||
title: '日程安排',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/plan/list': {
|
||||
'/plan/list': {
|
||||
title: '日程清单',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/plan/detail/id': {
|
||||
'/plan/detail/id': {
|
||||
title: '日程内容',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/anniversary': {
|
||||
'/anniversary': {
|
||||
title: '纪念日',
|
||||
icon: 'home-anniversary',
|
||||
order: 6,
|
||||
redirect: '/mobile-home/anniversary/list'
|
||||
redirect: '/anniversary/list'
|
||||
},
|
||||
'/mobile-home/anniversary/list': {
|
||||
'/anniversary/list': {
|
||||
title: '纪念日',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/anniversary/category': {
|
||||
'/anniversary/category': {
|
||||
title: '分类',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/anniversary/detail/id': {
|
||||
'/anniversary/detail/id': {
|
||||
title: '纪念日内容',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/period': {
|
||||
'/period': {
|
||||
title: '月经记录',
|
||||
icon: 'home-period',
|
||||
order: 7,
|
||||
redirect: '/mobile-home/period/calendar'
|
||||
redirect: '/period/calendar'
|
||||
},
|
||||
'/mobile-home/period/calendar': {
|
||||
'/period/calendar': {
|
||||
title: '记录',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/period/setting': {
|
||||
'/period/setting': {
|
||||
title: '设置',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/product': {
|
||||
'/product': {
|
||||
title: '物品记录',
|
||||
icon: 'home-product',
|
||||
order: 8,
|
||||
redirect: '/mobile-home/product/list'
|
||||
redirect: '/product/list'
|
||||
},
|
||||
'/mobile-home/product/list': {
|
||||
'/product/list': {
|
||||
title: '清单',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/product/detail/id': {
|
||||
'/product/detail/id': {
|
||||
title: '内容',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/journal': {
|
||||
'/journal': {
|
||||
title: '日记',
|
||||
icon: 'home-product',
|
||||
order: 9,
|
||||
redirect: '/mobile-home/journal/record'
|
||||
redirect: '/journal/record'
|
||||
},
|
||||
'/mobile-home/journal/record': {
|
||||
'/journal/record': {
|
||||
title: '清单',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/journal/detail': {
|
||||
'/journal/detail': {
|
||||
title: '内容',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/journal/timeline': {
|
||||
'/journal/timeline': {
|
||||
title: '时间轴',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/kpi': {
|
||||
'/kpi': {
|
||||
title: '绩效',
|
||||
icon: 'home-kpi',
|
||||
order: 10,
|
||||
redirect: '/mobile-home/kpi/record'
|
||||
redirect: '/kpi/record'
|
||||
},
|
||||
'/mobile-home/kpi/record': {
|
||||
'/kpi/record': {
|
||||
title: '记录',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/pki/detail/:id': {
|
||||
'/pki/detail/:id': {
|
||||
title: '内容',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/server': {
|
||||
'/server': {
|
||||
title: '服务',
|
||||
icon: 'home-server',
|
||||
order: 11,
|
||||
redirect: '/mobile-home/server/list'
|
||||
redirect: '/server/list'
|
||||
},
|
||||
'/mobile-home/server/monitor': {
|
||||
'/server/monitor': {
|
||||
title: '监控',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/server/file': {
|
||||
'/server/file': {
|
||||
title: '文件',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/server/preview/:url': {
|
||||
'/server/preview/:url': {
|
||||
title: '预览',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/asset': {
|
||||
'/asset': {
|
||||
title: '资产',
|
||||
icon: 'home-asset',
|
||||
order: 12,
|
||||
redirect: '/mobile-home/asset/list'
|
||||
redirect: '/asset/list'
|
||||
},
|
||||
'/mobile-home/asset/list': {
|
||||
'/asset/list': {
|
||||
title: '清单',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/asset/detail/id': {
|
||||
'/asset/detail/id': {
|
||||
title: '内容',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/ledger': {
|
||||
'/ledger': {
|
||||
title: '账本',
|
||||
icon: 'home-ledger',
|
||||
order: 13,
|
||||
redirect: '/mobile-home/ledger/list'
|
||||
redirect: '/ledger/list'
|
||||
},
|
||||
'/mobile-home/ledger/list': {
|
||||
'/ledger/list': {
|
||||
title: '清单',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/ledger/detail/id': {
|
||||
'/ledger/detail/id': {
|
||||
title: '内容',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/password': {
|
||||
'/password': {
|
||||
title: '密码',
|
||||
icon: 'home-password',
|
||||
order: 14,
|
||||
redirect: '/mobile-home/password/list'
|
||||
redirect: '/password/list'
|
||||
},
|
||||
'/mobile-home/password/list': {
|
||||
'/password/list': {
|
||||
title: '清单',
|
||||
icon: ''
|
||||
},
|
||||
'/mobile-home/profile': {
|
||||
'/profile': {
|
||||
title: '个人信息',
|
||||
icon: '',
|
||||
order: 15,
|
||||
hidden: true,
|
||||
redirect: '/mobile-home/profile/index'
|
||||
redirect: '/profile/index'
|
||||
},
|
||||
'/mobile-home/profile/index': {
|
||||
'/profile/index': {
|
||||
title: '个人信息',
|
||||
icon: '',
|
||||
hidden: true
|
||||
},
|
||||
'/mobile-home/profile/info': {
|
||||
'/profile/info': {
|
||||
title: '信息',
|
||||
icon: '',
|
||||
hidden: true
|
||||
},
|
||||
'/mobile-home/profile/password': {
|
||||
'/profile/password': {
|
||||
title: '密码',
|
||||
icon: '',
|
||||
hidden: true
|
||||
@@ -1,226 +0,0 @@
|
||||
<template>
|
||||
<div class="profile-view common-mobile-view">
|
||||
<div class="profile-card">
|
||||
<div class="avatar-wrapper">
|
||||
<el-avatar
|
||||
:src="serviceFileRootPath + userStore.userInfo.avatar"
|
||||
alt="用户头像" :size="80"
|
||||
/>
|
||||
|
||||
<i v-if="userStore.userInfo.gender"
|
||||
class="fas fa-mars gender-icon" style="color: #409EFF"></i>
|
||||
<i v-else class="fas fa fa-venus gender-icon" style="color: #FFB6C1"></i>
|
||||
</div>
|
||||
|
||||
<span class="user-name">{{ userStore.userInfo.accountName }}</span>
|
||||
|
||||
<div class="user-info">
|
||||
<div class="info-item">
|
||||
<i class="fas fa-map-marker-alt"></i>
|
||||
<span>{{ userStore.userInfo.area.join('-') }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<i class="fas fa-birthday-cake"></i>
|
||||
<span>{{ userStore.userInfo.birthDate }}</span>
|
||||
</div>
|
||||
|
||||
<div class="info-item">
|
||||
<i class="fas fa-user-tie"></i>
|
||||
<span>{{ userStore.userInfo.job }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="user-info">
|
||||
<div class="info-item">
|
||||
<i class="fas fa-mobile-alt"></i>
|
||||
<span>{{ userStore.userInfo.phoneNumber }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<i class="fas fa-envelope"></i>
|
||||
<span>{{ userStore.userInfo.email }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="user-info">
|
||||
<el-tag v-for="(item, index) in userStore.userInfo.tags"
|
||||
:key="index">{{ item }}</el-tag>
|
||||
</div>
|
||||
|
||||
<span class="user-bio">{{ userStore.userInfo.description }}</span>
|
||||
</div>
|
||||
|
||||
<div class="menu-card card-item">
|
||||
<div class="menu-item" @click="infoClick">
|
||||
<i class="fas fa-user"></i>
|
||||
<span>基本资料</span>
|
||||
<i class="fas fa-chevron-right"></i>
|
||||
</div>
|
||||
|
||||
<div class="menu-divider"></div>
|
||||
<div class="menu-item">
|
||||
<i class="fas fa-file-alt"></i>
|
||||
<span>个人简历</span>
|
||||
<i class="fas fa-chevron-right"></i>
|
||||
</div>
|
||||
|
||||
<div class="menu-divider"></div>
|
||||
<div class="menu-item">
|
||||
<i class="fas fa-cog"></i>
|
||||
<span>账户设置</span>
|
||||
<i class="fas fa-chevron-right"></i>
|
||||
</div>
|
||||
|
||||
<div class="menu-divider"></div>
|
||||
<div class="menu-item" @click="passwordClick">
|
||||
<i class="fas fa-key"></i>
|
||||
<span>更改密码</span>
|
||||
<i class="fas fa-chevron-right"></i>
|
||||
</div>
|
||||
|
||||
<div class="menu-divider"></div>
|
||||
<div class="menu-item" @click="refreshClick">
|
||||
<i class="fa-solid fa-arrows-rotate"></i>
|
||||
<span>检查更新</span>
|
||||
<i class="fas fa-chevron-right"></i>
|
||||
</div>
|
||||
|
||||
<div class="menu-divider"></div>
|
||||
<div class="menu-item" @click="logoutClick">
|
||||
<i class="fas fa-sign-out-alt"></i>
|
||||
<span>退出登录</span>
|
||||
<i class="fas fa-chevron-right"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="version">版本号 {{ appStore.version }}</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted } from 'vue'
|
||||
import { useUserStore } from '@/store/user.ts'
|
||||
import { useAppStore } from '@/store/app.ts'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { commonElMessageBox } from 'vue3-common/utils/elUtil'
|
||||
import { serviceFileRootPath } from '@/utils'
|
||||
|
||||
const userStore = useUserStore()
|
||||
const appStore = useAppStore()
|
||||
const router = useRouter()
|
||||
|
||||
onMounted(() => {
|
||||
userStore.queryUser()
|
||||
})
|
||||
|
||||
const infoClick = () => {
|
||||
appStore.isShowMobileBack = true
|
||||
router.push('/mobile-home/profile/info')
|
||||
}
|
||||
|
||||
const passwordClick = () => {
|
||||
// appStore.isShowMobileBack = true
|
||||
// router.push('/mobile-home/profile/password')
|
||||
}
|
||||
|
||||
const refreshClick = async () => {
|
||||
await router.push('/')
|
||||
location.reload()
|
||||
}
|
||||
|
||||
const logoutClick = () => {
|
||||
commonElMessageBox('请确认是否退出系统?').then(() => {
|
||||
userStore.removeAll()
|
||||
router.push('/')
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.profile-view {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
|
||||
.profile-card {
|
||||
background: linear-gradient(135deg, #6e8efb, #a777e3);
|
||||
border-radius: 10px;
|
||||
padding: 20px;
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
|
||||
text-align: center;
|
||||
color: white;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 15px;
|
||||
|
||||
.avatar-wrapper {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
|
||||
.gender-icon {
|
||||
position: absolute;
|
||||
right: 2px;
|
||||
bottom: 0;
|
||||
background: white;
|
||||
border-radius: 50%;
|
||||
padding: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.user-name {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.user-info {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
font-size: 1.1rem;
|
||||
|
||||
.info-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.menu-card {
|
||||
border-radius: 10px;
|
||||
padding: 10px;
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
|
||||
.menu-item {
|
||||
padding: 10px;
|
||||
display: grid;
|
||||
grid-template-columns: 20px 1fr 15px;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
cursor: pointer;
|
||||
font-size: 1.2rem;
|
||||
|
||||
i {
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
|
||||
span {
|
||||
color: var(--color-text);
|
||||
}
|
||||
}
|
||||
|
||||
.menu-divider {
|
||||
height: 1px;
|
||||
background-color: #E8E8E8;
|
||||
margin: 0 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.version {
|
||||
align-self: center;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -72,7 +72,7 @@
|
||||
import { usePasswordStore } from '@/store/password.ts'
|
||||
import { useAppStore } from '@/store/app.ts'
|
||||
import { FormRules } from 'element-plus'
|
||||
import { passwordRules } from '@/utils/element/elRules'
|
||||
import { passwordRules } from '@/utils/element/elRules.ts'
|
||||
import { onMounted, reactive, ref } from 'vue'
|
||||
|
||||
const formRef = ref()
|
||||
@@ -14,9 +14,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import DraggableButton from '@/components/Mobile/DraggableButton.vue'
|
||||
import PasswordQuery from '@/components/Home/Password/PasswordQuery.vue'
|
||||
import PasswordCard from '@/components/Home/Password/PasswordCard.vue'
|
||||
import DraggableButton from '@/components/Common/DraggableButton.vue'
|
||||
import PasswordQuery from '@/components/Password/PasswordQuery.vue'
|
||||
import PasswordCard from '@/components/Password/PasswordCard.vue'
|
||||
import { usePasswordStore } from '@/store/password.ts'
|
||||
import { onMounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
@@ -31,7 +31,7 @@ onMounted(async () => {
|
||||
const addClick = () => {
|
||||
passwordStore.passwordApiType = 'ADD'
|
||||
passwordStore.currentPassword = passwordStore.getEmptyPassword()
|
||||
router.push({ name: 'MobileHomePasswordDetailId', params: { id: 0 } })
|
||||
router.push({ name: 'PasswordDetailId', params: { id: 0 } })
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import PeriodLegend from '@/components/Home/Period/PeriodLegend.vue'
|
||||
import PeriodForm from '@/components/Home/Period/PeriodForm.vue'
|
||||
import PeriodLegend from '@/components/Period/PeriodLegend.vue'
|
||||
import PeriodForm from '@/components/Period/PeriodForm.vue'
|
||||
import { CalendarDay } from 'v-calendar/dist/types/src/utils/page'
|
||||
import { formatDate, getNextDate } from 'vue3-common/utils/dateUtil'
|
||||
import { onMounted, reactive, watch } from 'vue'
|
||||
import { usePeriodStore } from '@/store/period.ts'
|
||||
import { useAppStore } from '@/store/app'
|
||||
import { IPeriodDay } from '@/types/period'
|
||||
import { useAppStore } from '@/store/app.ts'
|
||||
import { IPeriodDay } from '@/types/period.ts'
|
||||
import dayjs, { Dayjs } from 'dayjs'
|
||||
|
||||
const periodStore = usePeriodStore()
|
||||
@@ -31,7 +31,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { usePeriodStore } from '@/store/period'
|
||||
import { usePeriodStore } from '@/store/period.ts'
|
||||
import { useAppStore } from '@/store/app.ts'
|
||||
import { onMounted, ref } from 'vue'
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import PlanCalendar from '@/components/Home/Plan/PlanCalendar.vue'
|
||||
import PlanCalendar from '@/components/Plan/PlanCalendar.vue'
|
||||
import { usePlanStore } from '@/store/plan.ts'
|
||||
import { onMounted } from 'vue'
|
||||
import PlanStats from '@/components/Home/Plan/PlanStats.vue'
|
||||
import PlanStats from '@/components/Plan/PlanStats.vue'
|
||||
|
||||
const planStore = usePlanStore()
|
||||
|
||||
@@ -19,5 +19,5 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@use "@/styles/home/plan.mobile.module.scss";
|
||||
@use "@/styles/home/plan.mobile.module";
|
||||
</style>
|
||||
@@ -93,9 +93,9 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ElMessage, FormInstance, FormRules } from 'element-plus'
|
||||
import { planRules } from '@/utils/element/elRules'
|
||||
import { planRules } from '@/utils/element/elRules.ts'
|
||||
import { nextTick, onMounted, reactive, ref } from 'vue'
|
||||
import { isBeforeTime } from '@/utils/home/planUtil'
|
||||
import { isBeforeTime } from '@/utils/home/planUtil.ts'
|
||||
import { commonElMessageBox } from 'vue3-common/utils/elUtil'
|
||||
import { usePlanStore } from '@/store/plan.ts'
|
||||
import { useUserStore } from '@/store/user.ts'
|
||||
@@ -9,10 +9,10 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import PlanList from '@/components/Home/Plan/PlanList.vue'
|
||||
import PlanQuery from '@/components/Home/Plan/PlanQuery.vue'
|
||||
import PlanList from '@/components/Plan/PlanList.vue'
|
||||
import PlanQuery from '@/components/Plan/PlanQuery.vue'
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import { usePlanStore } from '@/store/plan'
|
||||
import { usePlanStore } from '@/store/plan.ts'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const planStore = usePlanStore()
|
||||
@@ -21,10 +21,10 @@ const router = useRouter()
|
||||
const addNewPlanClick = () => {
|
||||
planStore.planApiType = 'ADD'
|
||||
planStore.currentPlan = planStore.getEmptyPlan()
|
||||
router.push({ name: 'MobileHomePlanDetailId', params: { id: 0 } })
|
||||
router.push({ name: 'PlanDetailId', params: { id: 0 } })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@use "@/styles/home/plan.mobile.module.scss";
|
||||
@use "@/styles/home/plan.mobile.module";
|
||||
</style>
|
||||
@@ -78,10 +78,10 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { UploadImage } from 'vue3-common'
|
||||
import { useProductStore } from '@/store/product'
|
||||
import { useProductStore } from '@/store/product.ts'
|
||||
import { useAppStore } from '@/store/app.ts'
|
||||
import { FormRules } from 'element-plus'
|
||||
import { productRules } from '@/utils/element/elRules'
|
||||
import { productRules } from '@/utils/element/elRules.ts'
|
||||
import { onMounted, reactive, ref } from 'vue'
|
||||
import { fileServiceUrl, serviceFileRootPath } from '@/utils'
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import DraggableButton from '@/components/Mobile/DraggableButton.vue'
|
||||
import ProductQuery from '@/components/Home/Product/ProductQuery.vue'
|
||||
import ProductCard from '@/components/Home/Product/ProductCard.vue'
|
||||
import DraggableButton from '@/components/Common/DraggableButton.vue'
|
||||
import ProductQuery from '@/components/Product/ProductQuery.vue'
|
||||
import ProductCard from '@/components/Product/ProductCard.vue'
|
||||
import { useProductStore } from '@/store/product.ts'
|
||||
import { onMounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
@@ -31,7 +31,7 @@ onMounted(async () => {
|
||||
const addClick = () => {
|
||||
productStore.productApiType = 'ADD'
|
||||
productStore.currentProduct = productStore.getEmptyProduct()
|
||||
router.push({ name: 'MobileHomeProductDetailId', params: { id: 0 } })
|
||||
router.push({ name: 'ProductDetailId', params: { id: 0 } })
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,154 +1,226 @@
|
||||
<template>
|
||||
<div class="profile-view common-view">
|
||||
<div class="left-container">
|
||||
<div class="summary">
|
||||
<el-avatar :size="80" :src="'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png'" />
|
||||
<span class="name">{{ userStore.userInfo.accountName }}</span>
|
||||
<span class="description">{{ userStore.userInfo.description }}</span>
|
||||
<el-divider />
|
||||
<div class="profile-view common-mobile-view">
|
||||
<div class="profile-card">
|
||||
<div class="avatar-wrapper">
|
||||
<el-avatar
|
||||
:src="serviceFileRootPath + userStore.userInfo.avatar"
|
||||
alt="用户头像" :size="80"
|
||||
/>
|
||||
|
||||
<i v-if="userStore.userInfo.gender"
|
||||
class="fas fa-mars gender-icon" style="color: #409EFF"></i>
|
||||
<i v-else class="fas fa fa-venus gender-icon" style="color: #FFB6C1"></i>
|
||||
</div>
|
||||
|
||||
<div class="basic-info">
|
||||
<div class="item">
|
||||
<i class="fa-solid fa-user"></i>
|
||||
<span>{{ userStore.userInfo.username }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<i class="fa-solid fa-location-dot"></i>
|
||||
<span class="user-name">{{ userStore.userInfo.accountName }}</span>
|
||||
|
||||
<div class="user-info">
|
||||
<div class="info-item">
|
||||
<i class="fas fa-map-marker-alt"></i>
|
||||
<span>{{ userStore.userInfo.area.join('-') }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<i class="fa-solid fa-map-location-dot"></i>
|
||||
<span>{{ userStore.userInfo.address }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<i class="fa-solid fa-venus-mars"></i>
|
||||
<span>{{ userStore.userInfo.gender === 0 ? '女' : '男' }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<i class="fa-solid fa-cake-candles"></i>
|
||||
<div class="info-item">
|
||||
<i class="fas fa-birthday-cake"></i>
|
||||
<span>{{ userStore.userInfo.birthDate }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<i class="fa-solid fa-clipboard-list"></i>
|
||||
<span>{{ userStore.userInfo.description }}</span>
|
||||
|
||||
<div class="info-item">
|
||||
<i class="fas fa-user-tie"></i>
|
||||
<span>{{ userStore.userInfo.job }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="user-info">
|
||||
<div class="info-item">
|
||||
<i class="fas fa-mobile-alt"></i>
|
||||
<span>{{ userStore.userInfo.phoneNumber }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<i class="fas fa-envelope"></i>
|
||||
<span>{{ userStore.userInfo.email }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="user-info">
|
||||
<el-tag v-for="(item, index) in userStore.userInfo.tags"
|
||||
:key="index">{{ item }}</el-tag>
|
||||
</div>
|
||||
|
||||
<span class="user-bio">{{ userStore.userInfo.description }}</span>
|
||||
</div>
|
||||
|
||||
<div class="menu-card card-item">
|
||||
<div class="menu-item" @click="infoClick">
|
||||
<i class="fas fa-user"></i>
|
||||
<span>基本资料</span>
|
||||
<i class="fas fa-chevron-right"></i>
|
||||
</div>
|
||||
|
||||
<div class="menu-divider"></div>
|
||||
<div class="menu-item">
|
||||
<i class="fas fa-file-alt"></i>
|
||||
<span>个人简历</span>
|
||||
<i class="fas fa-chevron-right"></i>
|
||||
</div>
|
||||
|
||||
<div class="menu-divider"></div>
|
||||
<div class="menu-item">
|
||||
<i class="fas fa-cog"></i>
|
||||
<span>账户设置</span>
|
||||
<i class="fas fa-chevron-right"></i>
|
||||
</div>
|
||||
|
||||
<div class="menu-divider"></div>
|
||||
<div class="menu-item" @click="passwordClick">
|
||||
<i class="fas fa-key"></i>
|
||||
<span>更改密码</span>
|
||||
<i class="fas fa-chevron-right"></i>
|
||||
</div>
|
||||
|
||||
<div class="menu-divider"></div>
|
||||
<div class="menu-item" @click="refreshClick">
|
||||
<i class="fa-solid fa-arrows-rotate"></i>
|
||||
<span>检查更新</span>
|
||||
<i class="fas fa-chevron-right"></i>
|
||||
</div>
|
||||
|
||||
<div class="menu-divider"></div>
|
||||
<div class="menu-item" @click="logoutClick">
|
||||
<i class="fas fa-sign-out-alt"></i>
|
||||
<span>退出登录</span>
|
||||
<i class="fas fa-chevron-right"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="right-container">
|
||||
<el-tabs v-model="profileInfo.activeName">
|
||||
<el-tab-pane label="基本信息" name="info">
|
||||
<profile-info />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="账号绑定" name="account">
|
||||
<profile-account />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="重置密码" name="password">
|
||||
<profile-password />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
<div class="version">版本号 {{ appStore.version }}</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import ProfileInfo from '@/components/Home/Profile/ProfileInfo.vue'
|
||||
import ProfileAccount from '@/components/Home/Profile/ProfileAccount.vue'
|
||||
import ProfilePassword from '@/components/Home/Profile/ProfilePassword.vue'
|
||||
import { reactive } from 'vue'
|
||||
import { onMounted } from 'vue'
|
||||
import { useUserStore } from '@/store/user.ts'
|
||||
import { useAppStore } from '@/store/app.ts'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { commonElMessageBox } from 'vue3-common/utils/elUtil'
|
||||
import { serviceFileRootPath } from '@/utils'
|
||||
|
||||
const userStore = useUserStore()
|
||||
const appStore = useAppStore()
|
||||
const router = useRouter()
|
||||
|
||||
const profileInfo = reactive({
|
||||
activeName: 'info'
|
||||
onMounted(() => {
|
||||
userStore.queryUser()
|
||||
})
|
||||
|
||||
const infoClick = () => {
|
||||
appStore.isShowMobileBack = true
|
||||
router.push('/home-home/profile/info')
|
||||
}
|
||||
|
||||
const passwordClick = () => {
|
||||
// appStore.isShowMobileBack = true
|
||||
// router.push('/home-home/profile/password')
|
||||
}
|
||||
|
||||
const refreshClick = async () => {
|
||||
await router.push('/')
|
||||
location.reload()
|
||||
}
|
||||
|
||||
const logoutClick = () => {
|
||||
commonElMessageBox('请确认是否退出系统?').then(() => {
|
||||
userStore.removeAll()
|
||||
router.push('/')
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.profile-view {
|
||||
display: grid;
|
||||
grid-template-columns: 40% 58%;
|
||||
justify-content: space-between;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
|
||||
.left-container {
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 15px;
|
||||
.profile-card {
|
||||
background: linear-gradient(135deg, #6e8efb, #a777e3);
|
||||
border-radius: 10px;
|
||||
padding: 20px;
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
|
||||
text-align: center;
|
||||
color: white;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
align-items: center;
|
||||
gap: 15px;
|
||||
|
||||
.summary {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
.avatar-wrapper {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
|
||||
.name {
|
||||
font-size: 1.5rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.description {
|
||||
font-size: 1.2rem;
|
||||
.gender-icon {
|
||||
position: absolute;
|
||||
right: 2px;
|
||||
bottom: 0;
|
||||
background: white;
|
||||
border-radius: 50%;
|
||||
padding: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.basic-info {
|
||||
flex-grow: 1;
|
||||
padding: 0 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
.user-name {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.item {
|
||||
height: 30px;
|
||||
i {
|
||||
width: 20px;
|
||||
color: #0d9488;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.user-info {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
font-size: 1.1rem;
|
||||
|
||||
.info-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.right-container {
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 15px;
|
||||
padding: 20px;
|
||||
.menu-card {
|
||||
border-radius: 10px;
|
||||
padding: 10px;
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
|
||||
.profile-account {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1vh;
|
||||
.menu-item {
|
||||
padding: 10px;
|
||||
display: grid;
|
||||
grid-template-columns: 20px 1fr 15px;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
cursor: pointer;
|
||||
font-size: 1.2rem;
|
||||
|
||||
.item {
|
||||
display: grid;
|
||||
grid-template-columns: 50px 4fr 1fr;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #DCDCDC;
|
||||
padding-bottom: 10px;
|
||||
i {
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
|
||||
i {
|
||||
justify-self: center;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1vh;
|
||||
}
|
||||
|
||||
.el-button {
|
||||
justify-self: center;
|
||||
width: 80px;
|
||||
}
|
||||
span {
|
||||
color: var(--color-text);
|
||||
}
|
||||
}
|
||||
|
||||
.menu-divider {
|
||||
height: 1px;
|
||||
background-color: #E8E8E8;
|
||||
margin: 0 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.version {
|
||||
align-self: center;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -35,10 +35,10 @@
|
||||
<script lang="ts" setup>
|
||||
import FileIcons from 'file-icons-vue'
|
||||
import { useAppStore } from '@/store/app.ts'
|
||||
import { useFileStore } from '@/store/file'
|
||||
import { useFileStore } from '@/store/file.ts'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { onMounted } from 'vue'
|
||||
import { IFileInfo } from '@/types/file'
|
||||
import { IFileInfo } from '@/types/file.ts'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
const fileStore = useFileStore()
|
||||
@@ -13,12 +13,12 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import ServerCard from '@/components/Home/Server/ServerCard.vue'
|
||||
import ServerProgress from '@/components/Home/Server/ServerProgress.vue'
|
||||
import ServerCard from '@/components/Server/ServerCard.vue'
|
||||
import ServerProgress from '@/components/Server/ServerProgress.vue'
|
||||
import { useAppStore } from '@/store/app.ts'
|
||||
import { onMounted, onUnmounted, reactive } from 'vue'
|
||||
import { WebSocketUtil } from 'vue3-common/utils/webSocketUtil'
|
||||
import { IServerMonitor } from '@/types/server'
|
||||
import { IServerMonitor } from '@/types/server.ts'
|
||||
import { formatDate } from 'vue3-common/utils/dateUtil'
|
||||
|
||||
const appStore = useAppStore()
|
||||
@@ -19,9 +19,9 @@
|
||||
<script setup lang="ts">
|
||||
import { useTravelStore } from '@/store/travel.ts'
|
||||
import { useRoute } from 'vue-router'
|
||||
import TravelBasicData from '@/components/Home/Travel/Data/TravelBasicData.vue'
|
||||
import TravelGuideData from '@/components/Home/Travel/Data/TravelGuideData.vue'
|
||||
import TravelRecordData from '@/components/Home/Travel/Data/TravelRecordData.vue'
|
||||
import TravelBasicData from '@/components/Travel/Data/TravelBasicData.vue'
|
||||
import TravelGuideData from '@/components/Travel/Data/TravelGuideData.vue'
|
||||
import TravelRecordData from '@/components/Travel/Data/TravelRecordData.vue'
|
||||
import { onMounted } from 'vue'
|
||||
|
||||
const travelStore = useTravelStore()
|
||||
@@ -33,5 +33,5 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@use "@/styles/home/life.detail.module.scss";
|
||||
@use "@/styles/home/life.detail.module";
|
||||
</style>
|
||||
@@ -9,9 +9,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import TravelStats from '@/components/Home/Travel/TravelStats.vue'
|
||||
import TravelCalendar from '@/components/Home/Travel/TravelCalendar.vue'
|
||||
import DraggableButton from '@/components/Mobile/DraggableButton.vue'
|
||||
import TravelStats from '@/components/Travel/TravelStats.vue'
|
||||
import TravelCalendar from '@/components/Travel/TravelCalendar.vue'
|
||||
import DraggableButton from '@/components/Common/DraggableButton.vue'
|
||||
import { useTravelStore } from '@/store/travel.ts'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { onMounted } from 'vue'
|
||||
@@ -26,10 +26,10 @@ onMounted(async () => {
|
||||
const addClick = () => {
|
||||
travelStore.travelRecordApiType = 'ADD'
|
||||
travelStore.currentTravelRecord = travelStore.getEmptyTravelRecord()
|
||||
router.push({ name: 'MobileHomeTravelRecordForm' })
|
||||
router.push({ name: 'TravelRecordForm' })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@use "@/styles/home/travel.mobile.module.scss";
|
||||
@use "@/styles/home/travel.mobile.module";
|
||||
</style>
|
||||
@@ -63,10 +63,10 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { UploadImage, UploadVideo } from 'vue3-common'
|
||||
import { useTravelStore } from '@/store/travel'
|
||||
import { useTravelStore } from '@/store/travel.ts'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { FormRules } from 'element-plus'
|
||||
import { travelRecordRules } from '@/utils/element/elRules'
|
||||
import { travelRecordRules } from '@/utils/element/elRules.ts'
|
||||
import { fileServiceUrl, serviceFileRootPath } from '@/utils'
|
||||
import { commonElMessageBox } from 'vue3-common/utils/elUtil'
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import TravelQuery from '@/components/Home/Travel/TravelQuery.vue'
|
||||
import ArriveBottom from '@/components/Mobile/ArriveButton.vue'
|
||||
import TravelQuery from '@/components/Travel/TravelQuery.vue'
|
||||
import ArriveBottom from '@/components/Common/ArriveButton.vue'
|
||||
import { onBeforeUnmount, onMounted, ref } from 'vue'
|
||||
import TravelCard from '@/components/Home/Travel/TravelCard.vue'
|
||||
import TravelCard from '@/components/Travel/TravelCard.vue'
|
||||
import { useTravelStore } from '@/store/travel.ts'
|
||||
import DraggableButton from '@/components/Mobile/DraggableButton.vue'
|
||||
import DraggableButton from '@/components/Common/DraggableButton.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const travelStore = useTravelStore()
|
||||
@@ -61,10 +61,10 @@ const handleScroll = () => {
|
||||
const addClick = () => {
|
||||
travelStore.travelSpotApiType = 'ADD'
|
||||
travelStore.currentTravelSpot = travelStore.getEmptyTravelSpot()
|
||||
router.push({ name: 'MobileHomeTravelSpotForm' })
|
||||
router.push({ name: 'TravelSpotForm' })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@use "@/styles/home/travel.mobile.module.scss";
|
||||
@use "@/styles/home/travel.mobile.module";
|
||||
</style>
|
||||
@@ -79,7 +79,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useTravelStore } from '@/store/travel'
|
||||
import { useTravelStore } from '@/store/travel.ts'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { pcTextArr } from 'element-china-area-data'
|
||||
import { FormRules } from 'element-plus'
|
||||
Reference in New Issue
Block a user