Commit d4d8f9c1 authored by 陈浩玮's avatar 陈浩玮

Merge branch 'master' into 'feature/chw'

# Conflicts:
#   src/components/table/table.vue
parents a61e43fb cd431ef6
......@@ -2,7 +2,7 @@
<a-select
show-search
class="tw-w-full"
placeholder="input search text"
:placeholder="$t('input.placeholder')"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
......
......@@ -16,11 +16,13 @@ export default {
<style module lang="less">
.container {
max-width: 400px;
> :last-child {
flex: 1;
}
}
.label {
color: rgba(0, 0, 0, 0.85);
width: 6em;
text-align: right;
margin-right: 1em;
......
......@@ -13,10 +13,12 @@
<slot name="moreSearch" :query="queryForm" />
</div>
</template>
<a-button>更多查询</a-button>
<a-button>{{ $t('table.moreSearch') }}</a-button>
</a-popover>
<a-button @click="reset">重置</a-button>
<a-button type="primary" @click="resetGetData">查询</a-button>
<a-button @click="reset">{{ $t('table.reset') }}</a-button>
<a-button type="primary" @click="resetGetData">{{ $t('table.search') }}</a-button>
</a-space>
</div>
</my-card>
......@@ -24,7 +26,7 @@
<my-card :class="noPadding ? 'tw-p-0' : ''" :style="tableCardStyle">
<a-space class="tw-mb-2">
<a-button type="primary" v-if="newBtn" @click="addBtnClick">
{{ newBtn.text || '新增' }}
{{ newBtn.text || $t('table.add') }}
</a-button>
<slot name="operation" />
</a-space>
......@@ -42,7 +44,7 @@
>
<slot />
<a-table-column
:title="newButtons.title"
:title="newButtons.title || $t('table.operation')"
v-if="this.newButtons"
v-bind="this.newButtons.options"
>
......@@ -65,7 +67,7 @@
:width="dWidth"
@close="hidden"
:maskClosable="false"
:title="title"
:title="drawerTitle"
:afterVisibleChange="afterVisibleChange"
>
<slot name="drawer" :hidden="hidden" :refresh="getData" :type="type" :row="row" />
......@@ -83,8 +85,6 @@ const initQuery = {
pageNum: 1,
};
const defaultTitle = '新增';
export default {
props: {
url: String,
......@@ -123,7 +123,7 @@ export default {
loading: false,
total: 0,
visible: false,
title: newBtn.title ?? defaultTitle,
title: null,
drawerStyle: {
display: 'flex',
flexDirection: 'column',
......@@ -160,7 +160,7 @@ export default {
newButtons() {
return this.buttons
? Array.isArray(this.buttons)
? { data: this.buttons, title: '操作' }
? { data: this.buttons }
: this.buttons
: null;
},
......@@ -188,6 +188,9 @@ export default {
}
: {};
},
drawerTitle() {
return this.title ?? this.addBtn?.title ?? this.$t('table.add');
},
},
methods: {
......@@ -228,7 +231,7 @@ export default {
},
afterVisibleChange(visible) {
if (!visible) {
this.title = this.addBtn?.title ?? defaultTitle;
this.title = null;
this.type = null;
this.row = null;
this.dWidth = this.drawerWidth;
......
<template>
<div >
<div :class="['mask', visible ? 'open' : 'close']" @click="close"></div>
<div :class="['drawer', placement, visible ? 'open' : 'close']">
<div ref="drawer" class="content beauty-scroll">
<slot></slot>
</div>
<div v-if="showHandler" :class="['handler-container', placement, visible ? 'open' : 'close']" ref="handler" @click="toggle">
<slot v-if="$slots.handler" name="handler"></slot>
<div v-else class="handler">
<a-icon :type="visible ? 'close' : 'bars'" />
</div>
</div>
<div>
<div :class="['mask', visible ? 'open' : 'close']" @click="close"></div>
<div :class="['drawer', placement, visible ? 'open' : 'close']">
<div ref="drawer" class="content beauty-scroll">
<slot />
</div>
<div
v-if="showHandler"
:class="['handler-container', placement, visible ? 'open' : 'close']"
ref="handler"
@click="toggle"
>
<slot v-if="$slots.handler" name="handler" />
<div v-else class="handler">
<a-icon :type="visible ? 'close' : 'bars'" />
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'Drawer',
data () {
return {
}
},
model: {
prop: 'visible',
event: 'change'
},
props: {
visible: {
type: Boolean,
required: false,
default: false
name: 'Drawer',
data() {
return {};
},
placement: {
type: String,
required: false,
default: 'left'
model: {
prop: 'visible',
event: 'change',
},
showHandler: {
type: Boolean,
required: false,
default: true
}
},
methods: {
open () {
this.$emit('change', true)
props: {
visible: {
type: Boolean,
required: false,
default: false,
},
placement: {
type: String,
required: false,
default: 'left',
},
showHandler: {
type: Boolean,
required: false,
default: true,
},
},
close () {
this.$emit('change', false)
methods: {
open() {
this.$emit('change', true);
},
close() {
this.$emit('change', false);
},
toggle() {
this.$emit('change', !this.visible);
},
},
toggle () {
this.$emit('change', !this.visible)
}
}
}
};
</script>
<style lang="less" scoped>
.mask{
.mask {
position: fixed;
left: 0;
right: 0;
......@@ -67,50 +71,50 @@ export default {
background-color: @shadow-color;
transition: all 0.5s;
z-index: 100;
&.open{
display: inline-block;
&.open {
display: inline-block;
}
&.close{
display: none;
&.close {
display: none;
}
}
.drawer{
}
.drawer {
position: fixed;
transition: all 0.5s;
height: 100vh;
z-index: 100;
&.left{
left: 0px;
&.open{
.content{
box-shadow: 2px 0 8px @shadow-color;
&.left {
left: 0px;
&.open {
.content {
box-shadow: 2px 0 8px @shadow-color;
}
}
&.close {
transform: translateX(-100%);
}
}
&.close{
transform: translateX(-100%);
}
}
&.right{
right: 0px;
.content{
float: right;
}
&.open{
.content{
box-shadow: -2px 0 8px @shadow-color;
&.right {
right: 0px;
.content {
float: right;
}
&.open {
.content {
box-shadow: -2px 0 8px @shadow-color;
}
}
&.close {
transform: translateX(100%);
}
}
&.close{
transform: translateX(100%);
}
}
}
.content{
}
.content {
display: inline-block;
height: 100vh;
overflow-y: auto;
}
.handler-container{
}
.handler-container {
position: absolute;
display: inline-block;
text-align: center;
......@@ -119,24 +123,24 @@ export default {
top: 200px;
z-index: 100;
.handler {
height: 40px;
width: 40px;
background-color: @base-bg-color;
font-size: 26px;
box-shadow: 0 2px 8px @shadow-color;
line-height: 40px;
height: 40px;
width: 40px;
background-color: @base-bg-color;
font-size: 26px;
box-shadow: 0 2px 8px @shadow-color;
line-height: 40px;
}
&.left{
right: -40px;
.handler{
border-radius: 0 5px 5px 0;
}
&.left {
right: -40px;
.handler {
border-radius: 0 5px 5px 0;
}
}
&.right{
left: -40px;
.handler{
border-radius: 5px 0 0 5px;
}
&.right {
left: -40px;
.handler {
border-radius: 5px 0 0 5px;
}
}
}
}
</style>
<template>
<a-upload :customRequest="customRequest" :showUploadList="showUploadList" v-bind="$attrs">
<slot>
<a-button> <a-icon type="upload" /> 上传 </a-button>
<a-button> <a-icon type="upload" />{{ $t('user.upload') }}</a-button>
</slot>
</a-upload>
</template>
......
import selectLang from './select';
import TableLang from './table';
import UserLang from './user';
const zh_CN = {};
const en_US = {};
......@@ -12,5 +14,7 @@ function formatLang(langObject) {
}
formatLang(selectLang);
formatLang(TableLang);
formatLang(UserLang);
export { en_US, zh_CN };
// 0 中文, 1 英文
export default {
'select.placeholder': ['请选择', 'Please Select'],
'select.startTime': ['开始时间', 'Start Time'],
'select.endTime': ['结束时间', 'End Time'],
'select.region': ['地区', 'Region'],
'select.speciality': ['专业', 'Speciality'],
'select.shiftTypeName': ['班组', 'ShiftTypeName'],
export: ['导出', 'Export'],
'select.routes': ['线路', 'Routes'],
'select.examine': ['巡检状态', 'Examine Status'],
'select.taskType': ['任务类型', 'Task Type'],
'select.examiner': ['巡检人', 'Examiner'],
'select.routeName': ['线路名称', 'RouteName'],
};
export default {
'table.operation': ['操作', 'Operation'],
'table.moreSearch': ['更多查询', 'More Search'],
'table.reset': ['重置', 'Reset'],
'table.add': ['新增', 'Add'],
'table.search': ['查询', 'Search'],
'input.placeholder': ['请输入', 'Please Input'],
'table.jobTime': ['任务时间', 'Job Time'],
'table.inspectionStartTime': ['巡检开始时间', 'InspectionStartTime'],
'table.inspectionEndTime': ['巡检结束时间', 'InspectionEndTime'],
'table.newTemporaryTask': ['新建临时任务', 'New Temporary Task'],
'table.detail': ['详情', 'Detail'],
'table.progress': ['进度', 'Progress'],
'table.pleaseSelect': ['请选择需要导出的数据', 'Please select the data to export'],
'table.taskDetail': ['任务明细', 'Task Detail'],
'table.taskProgress': ['任务进度', 'Task Progress'],
title: ['标题', 'Title'],
content: ['内容', 'Content'],
sender: ['发送者', 'Sender'],
recipient: ['接受者', 'Recipient'],
};
export default {
profile: ['个人中心', 'Profile'],
setting: ['个人设置', 'Setting'],
loginOut: ['退出登录', 'Login Out'],
tabNotice: ['通知', 'Notice'],
tabTodo: ['待办', 'Todo'],
'user.modifyPassword': ['修改密码', 'ModifyPassword'],
'user.account': ['用户账户', 'Account'],
'user.name': ['姓名', 'Name'],
'user.email': ['电子邮箱', 'Email'],
'user.fixedPhone': ['固定电话', 'Fixed Telephone'],
'user.mobilePhone': ['移动电话', 'Mobile Phone'],
'user.updateInfo': ['更新信息', 'Update Info'],
'user.avator': ['头像', 'Avator'],
'user.upload': ['上传', 'Upload'],
'table.createTime': ['创建时间', 'Create Time'],
'table.hasRead': ['是否已读', 'hasRead'],
'table.read': ['已读', 'Read'],
'table.unread': ['未读', 'Unread'],
'user.readTime': ['已读时间', 'Read Time'],
};
......@@ -20,12 +20,10 @@
<script>
import { logout } from '@/pages/frame/services/accountService';
import layoutTopHeaderI18n from './i18n';
import { getUserInfo } from '@/utils';
export default {
name: 'LayoutTopHeaderAvatar',
i18n: layoutTopHeaderI18n,
data: () => ({ userInfo: {} }),
computed: {
userAvatar() {
......
......@@ -2,22 +2,41 @@
<a-dropdown :trigger="['click']" v-model="show">
<div slot="overlay">
<a-spin :spinning="loading">
<a-tabs class="dropdown-tabs" :tabBarStyle="{textAlign: 'center'}" :style="{width: '297px'}">
<a-tabs
class="dropdown-tabs"
:tabBarStyle="{ textAlign: 'center' }"
:style="{ width: '297px' }"
>
<a-tab-pane :tab="tabNoticeTitle" key="1">
<a-list class="tab-pane">
<a-list-item>
<a-list-item-meta title="你收到了 14 份新周报" description="一年前">
<a-avatar style="background-color: white" slot="avatar" src="https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png" />
<a-avatar
style="background-color: white"
slot="avatar"
src="https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png"
/>
</a-list-item-meta>
</a-list-item>
<a-list-item>
<a-list-item-meta title="你推荐的 曲妮妮 已通过第三轮面试" description="一年前">
<a-avatar style="background-color: white" slot="avatar" src="https://gw.alipayobjects.com/zos/rmsportal/OKJXDXrmkNshAMvwtvhu.png" />
<a-list-item-meta
title="你推荐的 曲妮妮 已通过第三轮面试"
description="一年前"
>
<a-avatar
style="background-color: white"
slot="avatar"
src="https://gw.alipayobjects.com/zos/rmsportal/OKJXDXrmkNshAMvwtvhu.png"
/>
</a-list-item-meta>
</a-list-item>
<a-list-item>
<a-list-item-meta title="这种模板可以区分多种通知类型" description="一年前">
<a-avatar style="background-color: white" slot="avatar" src="https://gw.alipayobjects.com/zos/rmsportal/kISTdvpyTAhtGxpovNWd.png" />
<a-avatar
style="background-color: white"
slot="avatar"
src="https://gw.alipayobjects.com/zos/rmsportal/kISTdvpyTAhtGxpovNWd.png"
/>
</a-list-item-meta>
</a-list-item>
</a-list>
......@@ -37,11 +56,8 @@
</template>
<script>
import layoutTopHeaderI18n from './i18n';
export default {
name: 'LayoutTopHeaderNotice',
i18n: layoutTopHeaderI18n,
data() {
return {
loading: false,
......
export default {
messages: {
zh_CN: {
profile: '个人中心',
setting: '个人设置',
loginOut: '退出登录',
tabNotice: '通知',
tabTodo: '待办',
},
en_US: {
profile: 'Profile',
setting: 'Setting',
loginOut: 'Login Out',
tabNotice: 'Notice',
tabTodo: 'Todo',
},
},
};
......@@ -8,7 +8,7 @@
</setting-item>
<setting-item :title="$t('theme.title')">
<img-checkbox-group
@change="values => setTheme({ ...theme, mode: values[0] })"
@change="(values) => setTheme({ ...theme, mode: values[0] })"
:default-values="[theme.mode]"
>
<img-checkbox
......@@ -39,7 +39,7 @@
</setting-item>
<a-divider />
<setting-item :title="$t('navigate.title')">
<img-checkbox-group @change="values => setLayout(values[0])" :default-values="[layout]">
<img-checkbox-group @change="(values) => setLayout(values[0])" :default-values="[layout]">
<img-checkbox
:title="$t('navigate.side')"
img="https://gw.alipayobjects.com/zos/rmsportal/JopDzEhOqwOjeNTXkoje.svg"
......@@ -105,7 +105,7 @@
:checked="animate.disabled"
slot="actions"
size="small"
@change="val => setAnimate({ ...animate, disabled: val })"
@change="(val) => setAnimate({ ...animate, disabled: val })"
/>
</a-list-item>
<a-list-item>
......@@ -113,7 +113,7 @@
<a-select
:value="animate.name"
:getPopupContainer="getPopupContainer"
@change="val => setAnimate({ ...animate, name: val })"
@change="(val) => setAnimate({ ...animate, name: val })"
class="select-item"
size="small"
slot="actions"
......@@ -128,7 +128,7 @@
<a-select
:value="animate.direction"
:getPopupContainer="getPopupContainer"
@change="val => setAnimate({ ...animate, direction: val })"
@change="(val) => setAnimate({ ...animate, direction: val })"
class="select-item"
size="small"
slot="actions"
......@@ -238,7 +238,7 @@ export default {
},
computed: {
directions() {
return this.animates.find(item => item.name == this.animate.name).directions;
return this.animates.find((item) => item.name == this.animate.name).directions;
},
...mapState('settingModule', [
'theme',
......@@ -254,7 +254,7 @@ export default {
]),
},
watch: {
'animate.name': function(val) {
'animate.name': function (val) {
this.setAnimate({ name: val, direction: this.directions[0] });
},
},
......@@ -282,7 +282,7 @@ export default {
let config = {};
let mySetting = this.$store.state.settingModule;
let dftSetting = local ? settingConfig : settingConfig;
Object.keys(mySetting).forEach(key => {
Object.keys(mySetting).forEach((key) => {
const dftValue = dftSetting[key],
myValue = mySetting[key];
if (dftValue != undefined && !fastEqual(dftValue, myValue)) {
......@@ -309,6 +309,7 @@ export default {
<style lang="less" module>
.side-setting {
min-height: 100%;
width: 280px;
background-color: @base-bg-color;
padding: 24px;
font-size: 14px;
......
......@@ -47,9 +47,9 @@
<script>
import LayoutTopHeader from '../components/header/LayoutTopHeader.vue';
import Drawer from '@/components/tool/Drawer';
import Drawer from '@/components/tool/Drawer.vue';
import SideMenu from '@/components/menu/SideMenu.vue';
import Setting from '../components/setting/Setting';
import Setting from '../components/setting/Setting.vue';
import { mapState, mapMutations, mapGetters } from 'vuex';
import { convertListToTree, getUserInfo } from '@/utils';
......
......@@ -7,9 +7,10 @@
:selected.sync="selected"
ref="table"
:drawerWidth="800"
:scroll="scroll"
>
<template #search="{ query }">
<MoreItem label="开始时间">
<MoreItem :label="$t('select.startTime')">
<a-date-picker
class="tw-w-full"
show-time
......@@ -18,7 +19,7 @@
/>
</MoreItem>
<MoreItem label="结束时间">
<MoreItem :label="$t('select.endTime')">
<a-date-picker
class="tw-w-full"
show-time
......@@ -26,7 +27,7 @@
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</MoreItem>
<MoreItem label="地区">
<MoreItem :label="$t('select.region')">
<UrlSelect
url="/ranger/inspection/api/v1/region/list"
v-model="query.regionId"
......@@ -37,31 +38,7 @@
</template>
<template #moreSearch="{ query }">
<MoreItem label="开始时间">
<a-date-picker
class="tw-w-full"
show-time
v-model="query.startTime"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</MoreItem>
<MoreItem label="结束时间">
<a-date-picker
class="tw-w-full"
show-time
v-model="query.endTime"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</MoreItem>
<MoreItem label="地区">
<UrlSelect
url="/ranger/inspection/api/v1/region/list"
v-model="query.regionId"
labelFiled="regionName"
valueFiled="regionId"
/>
</MoreItem>
<MoreItem label="专业">
<MoreItem :label="$t('select.speciality')">
<UrlSelect
:url="
query.regionId
......@@ -73,7 +50,7 @@
valueFiled="specialityId"
/>
</MoreItem>
<MoreItem label="线路">
<MoreItem :label="$t('select.routes')">
<UrlSelect
:url="
query.regionId
......@@ -85,7 +62,7 @@
v-model="query.routeId"
/>
</MoreItem>
<MoreItem label="班组">
<MoreItem :label="$t('select.shiftTypeName')">
<RequestSelect
:request="getBanZuListApi"
v-model="query.shiftType"
......@@ -93,7 +70,7 @@
valueFiled="paramValue"
/>
</MoreItem>
<MoreItem label="巡检状态">
<MoreItem :label="$t('select.examine')">
<RequestSelect
:request="getBusinessListApi"
v-model="query.inspectionState"
......@@ -101,7 +78,7 @@
valueFiled="paramValue"
/>
</MoreItem>
<MoreItem label="任务类型">
<MoreItem :label="$t('select.taskType')">
<RequestSelect
:request="getTaskTypeApi"
v-model="query.jobType"
......@@ -109,7 +86,7 @@
valueFiled="paramValue"
/>
</MoreItem>
<MoreItem label="巡检人">
<MoreItem :label="$t('select.examiner')">
<SearchSelect
url="/api/v1/users/searching"
searchField="userName"
......@@ -121,7 +98,7 @@
</template>
<template #operation>
<a-button @click="download">导出</a-button>
<a-button @click="download">{{ $t('export') }}</a-button>
</template>
<template #drawer="{ hidden, refresh, type, row }">
......@@ -130,16 +107,16 @@
<Detail v-if="type === 'detail'" :hidden="hidden" :row="row" />
</template>
<a-table-column title="线路名称" data-index="routeName" />
<a-table-column title="专业" data-index="specialityName" />
<a-table-column title="地区" data-index="regionName" />
<a-table-column title="班组" data-index="shiftTypeName" />
<a-table-column title="任务时间" data-index="jobTime" />
<a-table-column title="巡检状态" data-index="inspectionStateName" />
<a-table-column title="任务类型" data-index="jobTypeName" />
<a-table-column title="巡检开始时间" data-index="inspectionStartTime" />
<a-table-column title="巡检结束时间" data-index="inspectionEndTime" />
<a-table-column title="巡检人" data-index="lastInspectionStaffName" />
<a-table-column :title="$t('select.routeName')" data-index="routeName" />
<a-table-column :title="$t('select.speciality')" data-index="specialityName" />
<a-table-column :title="$t('select.region')" data-index="regionName" />
<a-table-column :title="$t('select.shiftTypeName')" data-index="shiftTypeName" width="180px" />
<a-table-column :title="$t('table.jobTime')" data-index="jobTime" />
<a-table-column :title="$t('select.examine')" data-index="inspectionStateName" />
<a-table-column :title="$t('select.taskType')" data-index="jobTypeName" />
<a-table-column :title="$t('table.inspectionStartTime')" data-index="inspectionStartTime" />
<a-table-column :title="$t('table.inspectionEndTime')" data-index="inspectionEndTime" />
<a-table-column :title="$t('select.examiner')" data-index="lastInspectionStaffName" />
</Table>
</template>
......@@ -173,26 +150,30 @@ export default {
getBanZuListApi: () => getStaticDataByTwoParamsApi('rpis_route_schedule', 'shift_type'),
getTaskTypeApi: () => getStaticDataByTwoParamsApi('rpis_route_schedule', 'job_type'),
addBtn: {
title: '新建临时任务',
title: this.$t('table.newTemporaryTask'),
},
buttons: {
options: { fixed: 'right', width: 200 },
data: [
{
label: this.$t('table.detail'),
click: this.viewDetail,
},
{ label: this.$t('table.progress'), click: this.viewProgress },
{
type: 'confirm',
url: (row) => `/ranger/inspection/api/v1/jobs/${row.jobId}`,
after: this.refresh,
},
],
},
buttons: [
{
label: '详情',
click: this.viewDetail,
},
{ label: '进度', click: this.viewProgress },
{
type: 'confirm',
url: (row) => `/ranger/inspection/api/v1/jobs/${row.jobId}`,
after: this.refresh,
},
],
selected: {},
scroll: { x: 1500 },
};
},
methods: {
async download() {
if (!this.selected?.keys?.length) return this.$message.error('请选择需要导出的数据');
if (!this.selected?.keys?.length) return this.$message.error(this.$t('table.pleaseSelect'));
const url = await getXunJianDownloadUrlApi(this.selected.keys);
downloadFileByUrl(`${this.$fileUrl}${url}`);
},
......@@ -200,10 +181,10 @@ export default {
this.$refs['table'].getData();
},
viewProgress(row) {
this.$refs.table.show({ title: '任务进度', type: 'progress', row });
this.$refs.table.show({ title: this.$t('table.taskProgress'), type: 'progress', row });
},
viewDetail(row) {
this.$refs.table.show({ title: '任务明细', type: 'detail', row });
this.$refs.table.show({ title: this.$t('table.taskDetail'), type: 'detail', row });
},
},
};
......
<template>
<h1>TODO</h1>
</template>
<template>
<div class="tw-flex">
<a-form-model layout="vertical" style="flex: 0 0 400px">
<a-form-model-item label="用户账户">
<a-form-model-item :label="$t('user.account')">
<a-input disabled :value="loginId" />
</a-form-model-item>
<a-form-model-item label="姓名">
<a-form-model-item :label="$t('user.name')">
<a-input v-model="form.userName" />
</a-form-model-item>
<a-form-model-item label="固定电话">
<a-form-model-item :label="$t('user.fixedPhone')">
<a-input v-model="form.fixedPhone" />
</a-form-model-item>
<a-form-model-item label="移动电话">
<a-form-model-item :label="$t('user.mobilePhone')">
<a-input v-model="form.mobilePhone" />
</a-form-model-item>
<a-form-model-item label="电子邮箱">
<a-form-model-item :label="$t('user.email')">
<a-input v-model="form.userEmail" />
</a-form-model-item>
<a-form-model-item>
<a-button type="primary" :loading="loading" @click="update">更新信息</a-button>
<a-button type="primary" :loading="loading" @click="update">
{{ $t('user.updateInfo') }}
</a-button>
</a-form-model-item>
</a-form-model>
<div style="flex: 0 0 300px" class="tw-flex tw-flex-col tw-items-center ">
<div>头像</div>
<div style="flex: 0 0 300px" class="tw-flex tw-flex-col tw-items-center">
<div>{{ $t('user.avator') }}</div>
<img
style="width: 100px;height: 100px"
style="width: 100px; height: 100px"
class="tw-max-w-full tw-max-h-full tw-rounded-full tw-my-4"
:src="userAvatar"
/>
......
<template>
<my-table url="/api/v1/messages/notices">
<template #search="{query}">
<my-form-item label="开始时间">
<Table url="/api/v1/messages/notices" noMargin>
<template #search="{ query }">
<MoreItem :label="$t('select.startTime')">
<a-date-picker
class="tw-w-full"
show-time
v-model="query.startTime"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</my-form-item>
<my-form-item label="结束时间">
</MoreItem>
<MoreItem :label="$t('select.endTime')">
<a-date-picker
class="tw-w-full"
show-time
v-model="query.endTime"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</my-form-item>
<my-form-item label="是否已读">
<a-select v-model="query.isRead" allowClear>
<a-select-option :value="1">已读</a-select-option>
<a-select-option :value="0">未读</a-select-option>
</MoreItem>
<MoreItem :label="$t('table.hasRead')">
<a-select v-model="query.isRead" allowClear :placeholder="$t('input.placeholder')">
<a-select-option :value="1">{{ $t('table.read') }}</a-select-option>
<a-select-option :value="0">{{ $t('table.unread') }}</a-select-option>
</a-select>
</my-form-item>
</MoreItem>
</template>
<a-table-column title="标题" data-index="noticeTitle" />
<a-table-column title="内容" data-index="noticeContent" />
<a-table-column title="创建时间" data-index="createTime" />
<a-table-column title="发送者" data-index="noticeSenderName" />
<a-table-column title="接受者" data-index="noticeReceiverName" />
<a-table-column title="是否已读" data-index="isReadName" />
<a-table-column title="已读时间" data-index="readTime" />
</my-table>
<a-table-column :title="$t('title')" data-index="noticeTitle" />
<a-table-column :title="$t('content')" data-index="noticeContent" />
<a-table-column :title="$t('table.createTime')" data-index="createTime" />
<a-table-column :title="$t('sender')" data-index="noticeSenderName" />
<a-table-column :title="$t('recipient')" data-index="noticeReceiverName" />
<a-table-column :title="$t('user.read')" data-index="isReadName" />
<a-table-column :title="$t('user.readTime')" data-index="readTime" />
</Table>
</template>
<script>
import MoreItem from '@/components/table/more_item.vue';
import Table from '@/components/table/table.vue';
export default {
components: { MoreItem, Table },
};
</script>
\ No newline at end of file
<template>
<h1>ToDo</h1>
</template>
\ No newline at end of file
<template>
<h1>TODO</h1>
</template>
<template>
<my-card class="tw-flex">
<a-menu style="flex: 0 0 100px" v-model="selectKeys">
<a-menu-item key="UserInfo">个人信息</a-menu-item>
<a-menu-item key="ModifyPassword">修改密码</a-menu-item>
<a-menu-item key="MessageCenter">消息中心</a-menu-item>
<a-menu-item key="ToDo">代办事宜</a-menu-item>
<a-menu-item key="UserInfo">{{ $t('profile') }}</a-menu-item>
<a-menu-item key="ModifyPassword">{{ $t('user.modifyPassword') }}</a-menu-item>
<a-menu-item key="MessageCenter">{{ $t('tabNotice') }}</a-menu-item>
<a-menu-item key="ToDo">{{ $t('tabTodo') }}</a-menu-item>
</a-menu>
<div class="tw-flex-1 tw-ml-6">
<component :is="currentCom" />
......@@ -15,7 +15,7 @@
<script>
import UserInfo from './components/info.vue';
import MessageCenter from './components/message.vue';
import ToDo from './components/todo.vue';
import ToDo from './components/page_todo.vue';
import ModifyPassword from './components/modify_password.vue';
const components = {
......
......@@ -239,7 +239,7 @@ const hasAuthorityRoutes = [
],
},
{
path: 'user',
path: 'profile/accout',
name: '个人中心',
meta: { icon: 'user' },
component: () => import('@/pages/user/index.vue'),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment