mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-13 20:12:48 +00:00
fix: 工作包括编辑内容不正确的问题
This commit is contained in:
parent
e55a1d8713
commit
1323bba420
@ -282,7 +282,7 @@ class ReportController extends AbstractController
|
||||
}
|
||||
// 生成唯一标识
|
||||
$sign = Report::generateSign($type, 0, Carbon::instance($start_time));
|
||||
$one = Report::query()->whereSign($sign)->whereType($type)->first();
|
||||
$one = Report::whereSign($sign)->whereType($type)->first();
|
||||
// 如果已经提交了相关汇报
|
||||
if ($one && $id > 0) {
|
||||
return Base::retSuccess('success', [
|
||||
@ -292,7 +292,6 @@ class ReportController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
// 已完成的任务
|
||||
$completeContent = "";
|
||||
$complete_task = ProjectTask::query()
|
||||
|
||||
@ -111,7 +111,6 @@ export default {
|
||||
},
|
||||
|
||||
onEditReport(id) {
|
||||
this.reportId = id;
|
||||
if (this.$Electron) {
|
||||
let config = {
|
||||
title: this.$L(id > 0 ? '修改报告' : '新增报告'),
|
||||
@ -126,6 +125,7 @@ export default {
|
||||
config
|
||||
});
|
||||
} else {
|
||||
this.reportId = id;
|
||||
this.showEditDrawer = true;
|
||||
}
|
||||
},
|
||||
|
||||
@ -74,35 +74,33 @@ export default {
|
||||
id: 0,
|
||||
offset: 0 // 以当前日期为基础的周期偏移量。例如选择了上一周那么就是 -1,上一天同理。
|
||||
},
|
||||
prevCycleText: "",
|
||||
nextCycleText: "",
|
||||
prevCycleText: this.$L("上一周"),
|
||||
nextCycleText: this.$L("下一周"),
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
id(val) {
|
||||
if (this.id > 0) {
|
||||
this.getDetail(val);
|
||||
} else {
|
||||
this.reportData.offset = 0;
|
||||
this.reportData.type = "weekly";
|
||||
this.reportData.receive = [];
|
||||
this.getTemplate();
|
||||
}
|
||||
id: {
|
||||
handler(val) {
|
||||
if (val > 0) {
|
||||
this.getDetail(val);
|
||||
} else {
|
||||
this.reportData.offset = 0;
|
||||
this.reportData.type = "weekly";
|
||||
this.reportData.receive = [];
|
||||
this.getTemplate();
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapState(["userId"])
|
||||
},
|
||||
mounted() {
|
||||
this.getTemplate();
|
||||
//
|
||||
},
|
||||
methods: {
|
||||
initLanguage() {
|
||||
this.prevCycleText = this.$L("上一周");
|
||||
this.nextCycleText = this.$L("下一周");
|
||||
},
|
||||
|
||||
handleSubmit: function () {
|
||||
handleSubmit() {
|
||||
if (this.reportData.receive.length === 0) {
|
||||
$A.messageError(this.$L("请选择接收人"));
|
||||
return false;
|
||||
|
||||
@ -142,8 +142,11 @@ export default {
|
||||
},
|
||||
on: {
|
||||
action: (name) => {
|
||||
if (name === 'edit') this.$emit("on-edit", row.id);
|
||||
if (name === 'view') this.$emit("on-view", row);
|
||||
if (name === 'edit') {
|
||||
this.$emit("on-edit", row.id);
|
||||
} else if (name === 'view') {
|
||||
this.$emit("on-view", row);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user