优化代码
This commit is contained in:
parent
cc767b164e
commit
7ce15d5a71
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "DooTask",
|
||||
"version": "0.6.78",
|
||||
"version": "0.6.79",
|
||||
"description": "DooTask is task management system.",
|
||||
"main": "main.js",
|
||||
"license": "MIT",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "DooTask",
|
||||
"version": "0.6.78",
|
||||
"version": "0.6.79",
|
||||
"description": "DooTask is task management system.",
|
||||
"scripts": {
|
||||
"start": "./cmd dev",
|
||||
|
2
public/js/app.js
vendored
2
public/js/app.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -180,7 +180,7 @@
|
||||
v-model="workReportShow"
|
||||
placement="right"
|
||||
:size="1100">
|
||||
<Report v-if="workReportShow" :reportType="reportTabs" :reportUnreadNumber="reportUnreadNumber" @read="getReportUnread" />
|
||||
<Report v-if="workReportShow" :reportType="reportTabs" :reportUnreadNumber="reportUnreadNumber" @on-read="getReportUnread" />
|
||||
</DrawerOverlay>
|
||||
|
||||
<!--查看所有团队-->
|
||||
|
@ -2,10 +2,10 @@
|
||||
<div class="report">
|
||||
<Tabs v-model="reportTabs">
|
||||
<TabPane :label="$L('我的汇报')" name="my">
|
||||
<ReportMy ref="report" v-if="reportTabs === 'my'" @detail="showDetail" @edit="editReport"></ReportMy>
|
||||
<ReportMy ref="report" v-if="reportTabs === 'my'" @on-view="onView" @on-edit="onEditReport"></ReportMy>
|
||||
</TabPane>
|
||||
<TabPane :label="tabRebder(reportUnreadNumber)" name="receive">
|
||||
<ReportReceive v-if="reportTabs === 'receive'" @detail="showDetail"></ReportReceive>
|
||||
<ReportReceive v-if="reportTabs === 'receive'" @on-view="onView"></ReportReceive>
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
<DrawerOverlay
|
||||
@ -84,16 +84,13 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
showDetail(row) {
|
||||
onView(row) {
|
||||
this.showDetailDrawer = true;
|
||||
this.detailData = row;
|
||||
//1.5秒后执行
|
||||
setTimeout(() => {
|
||||
this.$emit("read");
|
||||
}, 1500);
|
||||
this.$emit("on-read");
|
||||
},
|
||||
|
||||
editReport(id) {
|
||||
onEditReport(id) {
|
||||
this.reportId = id;
|
||||
this.showEditDrawer = true;
|
||||
},
|
||||
@ -102,7 +99,7 @@ export default {
|
||||
this.reportId = 0;
|
||||
this.reportTabs = "my";
|
||||
this.showEditDrawer = false;
|
||||
this.$refs.report.getLists();
|
||||
this.$refs.report && this.$refs.report.getLists();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ export default {
|
||||
style: {margin: '0 3px', cursor: 'pointer'},
|
||||
on: {
|
||||
click: () => {
|
||||
this.$emit("edit", row.id);
|
||||
this.$emit("on-edit", row.id);
|
||||
}
|
||||
}
|
||||
})]),
|
||||
@ -138,7 +138,7 @@ export default {
|
||||
style: {margin: '0 3px', cursor: 'pointer'},
|
||||
on: {
|
||||
click: () => {
|
||||
this.$emit("detail", row);
|
||||
this.$emit("on-view", row);
|
||||
}
|
||||
}
|
||||
})]),
|
||||
@ -200,7 +200,7 @@ export default {
|
||||
},
|
||||
|
||||
addReport() {
|
||||
this.$emit("edit", 0);
|
||||
this.$emit("on-edit", 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ export default {
|
||||
style: {margin: '0 3px', cursor: 'pointer'},
|
||||
on: {
|
||||
click: () => {
|
||||
this.$emit("detail", row)
|
||||
this.$emit("on-view", row)
|
||||
const myUser = row.receives_user.find(({userid}) => userid == this.userId)
|
||||
if (myUser) {
|
||||
this.$set(myUser.pivot, 'read', 1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user