|
@@ -338,6 +338,7 @@
|
|
|
start-placeholder="开始日期"
|
|
|
end-placeholder="结束日期"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
+ :picker-options="repeatDatePickOptions()"
|
|
|
></el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
@@ -570,6 +571,7 @@
|
|
|
import { EXAM_WORK_API } from "@/constants/constants.js";
|
|
|
import { mapState } from "vuex";
|
|
|
import LinkTitlesCustom from "@/components/LinkTitlesCustom.vue";
|
|
|
+import moment from "moment";
|
|
|
|
|
|
let _this = null;
|
|
|
export default {
|
|
@@ -596,6 +598,7 @@ export default {
|
|
|
editStageVisible: false,
|
|
|
editStageCommonSettingVisible: false,
|
|
|
selectedExamStageIds: [],
|
|
|
+ exam: {},
|
|
|
examName: "",
|
|
|
examTypeName: "",
|
|
|
formSearch: {
|
|
@@ -697,6 +700,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ repeatDatePickOptions() {
|
|
|
+ return {
|
|
|
+ disabledDate: time => {
|
|
|
+ return !moment(time).isBetween(
|
|
|
+ moment(this.exam.beginTime),
|
|
|
+ moment(this.exam.endTime)
|
|
|
+ );
|
|
|
+ }
|
|
|
+ };
|
|
|
+ },
|
|
|
handleSubmitDuration() {
|
|
|
this.editStageCommonSettingForm.submitDuration = this.editStageCommonSettingForm.submitDuration.replace(
|
|
|
/[^\d]/g,
|
|
@@ -1120,11 +1133,18 @@ export default {
|
|
|
let dt = new Date(date);
|
|
|
dt.setDate(dt.getDate() + days);
|
|
|
return dt.getFullYear() + "-" + (dt.getMonth() + 1) + "-" + dt.getDate();
|
|
|
+ },
|
|
|
+ async getExamDetail(examId) {
|
|
|
+ let url = EXAM_WORK_API + "/exam/" + examId;
|
|
|
+ return this.$httpWithMsg.get(url).then(response => {
|
|
|
+ this.exam = response.data;
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
//初始化查询
|
|
|
- created() {
|
|
|
+ async created() {
|
|
|
this.formSearch.examId = this.$route.params.id;
|
|
|
+ await this.getExamDetail(this.formSearch.examId);
|
|
|
this.examName = this.$route.params.examName;
|
|
|
this.examTypeName = this.$route.params.examTypeName;
|
|
|
this.searchForm();
|