|
|
@@ -196,7 +196,7 @@ import imgUpload from "@/components/ImageUpload/index.vue";
|
|
|
import UserSelector from "@/components/userSelector/index.vue";
|
|
|
import { getLabel } from "@/views/commonOption.js";
|
|
|
import { checkPermi } from "@/utils/permission.js";
|
|
|
-import {deptTreeWithSameTypeUp} from "@/api/system/org.js"
|
|
|
+import { deptTreeWithSameTypeUp } from "@/api/system/org.js";
|
|
|
export default {
|
|
|
name: "safetyCheckRegister",
|
|
|
data() {
|
|
|
@@ -369,7 +369,7 @@ export default {
|
|
|
this.$message.warning("请选择要授权的人员");
|
|
|
return;
|
|
|
}
|
|
|
- let {planId,beCheckedOrgId,id,ymdDate}=this.taskInfo
|
|
|
+ let { planId, beCheckedOrgId, id, ymdDate } = this.taskInfo;
|
|
|
api
|
|
|
.grant({
|
|
|
planId,
|
|
|
@@ -387,12 +387,46 @@ export default {
|
|
|
this.$refs.UserSelector.show();
|
|
|
},
|
|
|
onSave() {
|
|
|
+ if (
|
|
|
+ dayjs()
|
|
|
+ .startOf("day")
|
|
|
+ .isBefore(dayjs(this.taskInfo.planStartTime).startOf("day"))
|
|
|
+ ) {
|
|
|
+ this.$modal.alert("任务未到开始时间,不能操作");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (
|
|
|
+ dayjs()
|
|
|
+ .endOf("day")
|
|
|
+ .isAfter(dayjs(this.taskInfo.planEndTime).endOf("day"))
|
|
|
+ ) {
|
|
|
+ this.$modal.alert("任务已逾期,不能操作");
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.taskInfo.isSubmit = 0;
|
|
|
api.submit(this.taskInfo).then((r) => {
|
|
|
this.$message.info("保存成功");
|
|
|
});
|
|
|
},
|
|
|
async onSubmit() {
|
|
|
+ if (
|
|
|
+ dayjs()
|
|
|
+ .startOf("day")
|
|
|
+ .isBefore(dayjs(this.taskInfo.planStartTime).startOf("day"))
|
|
|
+ ) {
|
|
|
+ this.$modal.alert("任务未到开始时间,不能操作");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (
|
|
|
+ dayjs()
|
|
|
+ .endOf("day")
|
|
|
+ .isAfter(dayjs(this.taskInfo.planEndTime).endOf("day"))
|
|
|
+ ) {
|
|
|
+ this.$modal.alert("任务已逾期,不能操作");
|
|
|
+ return;
|
|
|
+ }
|
|
|
let isOk = true;
|
|
|
let r = this.$refs;
|
|
|
for (let p in this.$refs) {
|