优化前端代码

This commit is contained in:
kuaifan 2022-01-21 14:21:48 +08:00
parent 52e9836bbf
commit da3672e6be
10 changed files with 27 additions and 25 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "DooTask", "name": "DooTask",
"version": "0.6.57", "version": "0.6.60",
"description": "DooTask is task management system.", "description": "DooTask is task management system.",
"main": "main.js", "main": "main.js",
"license": "MIT", "license": "MIT",

View File

@ -1,6 +1,6 @@
{ {
"name": "DooTask", "name": "DooTask",
"version": "0.6.57", "version": "0.6.60",
"description": "DooTask is task management system.", "description": "DooTask is task management system.",
"scripts": { "scripts": {
"start": "./cmd dev", "start": "./cmd dev",

2
public/css/app.css vendored

File diff suppressed because one or more lines are too long

2
public/js/app.js vendored

File diff suppressed because one or more lines are too long

1
public/js/build/63.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -11,11 +11,11 @@
<UserAvatar :userid="userId" :size="36" tooltipDisabled/> <UserAvatar :userid="userId" :size="36" tooltipDisabled/>
</div> </div>
<span>{{userInfo.nickname}}</span> <span>{{userInfo.nickname}}</span>
<Badge v-if="reportUnreadNumber > 0" class="manage-box-top-report" :count="reportUnreadNumber"/>
<div class="manage-box-arrow"> <div class="manage-box-arrow">
<Icon type="ios-arrow-up" /> <Icon type="ios-arrow-up" />
<Icon type="ios-arrow-down" /> <Icon type="ios-arrow-down" />
</div> </div>
<Badge v-if="reportUnreadNumber > 0" class="manage-box-top-report" :count="reportUnreadNumber"/>
</div> </div>
<DropdownMenu slot="list"> <DropdownMenu slot="list">
<DropdownItem <DropdownItem
@ -180,7 +180,7 @@
v-model="workReportShow" v-model="workReportShow"
placement="right" placement="right"
:size="1100"> :size="1100">
<Report v-if="workReportShow" :reportType="reportTabs" :reportUnreadNumber="reportUnreadNumber" @read="reportUnread" /> <Report v-if="workReportShow" :reportType="reportTabs" :reportUnreadNumber="reportUnreadNumber" @read="getReportUnread" />
</DrawerOverlay> </DrawerOverlay>
<!--查看所有团队--> <!--查看所有团队-->
@ -293,7 +293,7 @@ export default {
// //
this.notificationInit(); this.notificationInit();
this.onVisibilityChange(); this.onVisibilityChange();
this.reportUnread(); // this.getReportUnread(); //
// //
this.addTaskSubscribe = Store.subscribe('addTask', this.onAddTask); this.addTaskSubscribe = Store.subscribe('addTask', this.onAddTask);
this.dialogMsgSubscribe = Store.subscribe('dialogMsgPush', this.addDialogMsg); this.dialogMsgSubscribe = Store.subscribe('dialogMsgPush', this.addDialogMsg);
@ -741,7 +741,7 @@ export default {
document.addEventListener(visibilityChangeEvent, visibilityChangeListener); document.addEventListener(visibilityChangeEvent, visibilityChangeListener);
}, },
reportUnread() { getReportUnread() {
this.reportTabs = "my"; this.reportTabs = "my";
this.$store.dispatch("call", { this.$store.dispatch("call", {
url: 'report/unread', url: 'report/unread',

View File

@ -48,27 +48,28 @@ export default {
reportTabs: "my", reportTabs: "my",
showDetailDrawer: false, showDetailDrawer: false,
detailData: {}, detailData: {},
reportId: 0, reportId: 0
tabRebder: data => {
return h => {
if (data > 0) {
return h('div', [
h('span', {class: 'navbar-item-content'}, '收到的汇报'),
h('Badge', {class: 'manage-box-report'}, data),
])
} else {
return h('div', [
h('span', {class: 'navbar-item-content'}, '收到的汇报'),
])
}
}
}
} }
}, },
mounted() { mounted() {
this.reportTabs = this.reportType; this.reportTabs = this.reportType;
}, },
methods: { methods: {
tabRebder(data) {
return h => {
if (data > 0) {
return h('div', [
h('span', {class: 'navbar-item-content'}, this.$L('收到的汇报')),
h('Badge', {class: 'manage-box-report'}, data),
])
} else {
return h('div', [
h('span', {class: 'navbar-item-content'}, this.$L('收到的汇报')),
])
}
}
},
showDetail(row) { showDetail(row) {
this.showDetailDrawer = true; this.showDetailDrawer = true;
this.detailData = row; this.detailData = row;

View File

@ -55,7 +55,7 @@ export default {
}, },
mounted() { mounted() {
if (this.data.id > 0) this.sendRead(); if (this.data.id > 0) this.sendRead();
console.log(this.data) // console.log(this.data)
}, },
watch: { watch: {
data() { data() {

View File

@ -70,6 +70,7 @@
} }
} }
.manage-box-top-report { .manage-box-top-report {
margin-right: -6px;
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;