|
@@ -7,7 +7,55 @@
|
|
@search="search"
|
|
@search="search"
|
|
@init="init"
|
|
@init="init"
|
|
:remarkStatus="true"
|
|
:remarkStatus="true"
|
|
- ></search-box-new>
|
|
|
|
|
|
+ >
|
|
|
|
+ <template slot="month">
|
|
|
|
+ <el-select
|
|
|
|
+ size="small"
|
|
|
|
+ v-model="month"
|
|
|
|
+ placeholder="月份"
|
|
|
|
+ @change="getCanActiveApplyMonth"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in monthList"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ <el-select
|
|
|
|
+ style="margin-left: 10px"
|
|
|
|
+ size="small"
|
|
|
|
+ v-model="day"
|
|
|
|
+ v-if="month"
|
|
|
|
+ placeholder="日期"
|
|
|
|
+ @change="getCanActiveApply"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in dayList"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+
|
|
|
|
+ <el-select
|
|
|
|
+ style="margin-left: 10px"
|
|
|
|
+ v-if="month || day"
|
|
|
|
+ size="small"
|
|
|
|
+ v-model="monthApplyIndex"
|
|
|
|
+ placeholder="考试场次"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="(item, index) in monthApplyList"
|
|
|
|
+ :key="index"
|
|
|
|
+ :label="item.examSession"
|
|
|
|
+ :value="index"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </template></search-box-new>
|
|
<table-list
|
|
<table-list
|
|
ref="tableList"
|
|
ref="tableList"
|
|
:tableSets="tableSet"
|
|
:tableSets="tableSet"
|
|
@@ -113,6 +161,25 @@ export default {
|
|
title: "未定义",
|
|
title: "未定义",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
+ month: "",
|
|
|
|
+ monthList: [
|
|
|
|
+ { label: "一月", value: "01" },
|
|
|
|
+ { label: "二月", value: "02" },
|
|
|
|
+ { label: "三月", value: "03" },
|
|
|
|
+ { label: "四月", value: "04" },
|
|
|
|
+ { label: "五月", value: "05" },
|
|
|
|
+ { label: "六月", value: "06" },
|
|
|
|
+ { label: "七月", value: "07" },
|
|
|
|
+ { label: "八月", value: "08" },
|
|
|
|
+ { label: "九月", value: "09" },
|
|
|
|
+ { label: "十月", value: "10" },
|
|
|
|
+ { label: "十一月", value: "11" },
|
|
|
|
+ { label: "十二月", value: "12" },
|
|
|
|
+ ],
|
|
|
|
+ day: "",
|
|
|
|
+ dayList: [],
|
|
|
|
+ monthApplyIndex: "",
|
|
|
|
+ monthApplyList: [],
|
|
//搜索
|
|
//搜索
|
|
formList: [
|
|
formList: [
|
|
// {
|
|
// {
|
|
@@ -295,6 +362,12 @@ export default {
|
|
// prop: "",
|
|
// prop: "",
|
|
// placeholder: "输入订单编号",
|
|
// placeholder: "输入订单编号",
|
|
// },
|
|
// },
|
|
|
|
+ {
|
|
|
|
+ prop: "month",
|
|
|
|
+ placeholder: "月份",
|
|
|
|
+ scope: "slot",
|
|
|
|
+ slotName: "month",
|
|
|
|
+ },
|
|
],
|
|
],
|
|
formData: {
|
|
formData: {
|
|
status: "0,1",
|
|
status: "0,1",
|
|
@@ -385,6 +458,43 @@ export default {
|
|
this.$refs.fileDownload.openBoxs([i]);
|
|
this.$refs.fileDownload.openBoxs([i]);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ getMonthDays(target) {
|
|
|
|
+ let date = new Date(target + "-01"); // 移动端使用格式要转成: "2018/10/01"
|
|
|
|
+ date.setMonth(date.getMonth() + 1); // 先设置为下个月
|
|
|
|
+ date.setDate(0); // 再置0,变成当前月最后一天
|
|
|
|
+ return date.getDate(); // 当前月最后一天即当前月拥有的天数
|
|
|
|
+ },
|
|
|
|
+ getCanActiveApplyMonth() {
|
|
|
|
+ this.day = "";
|
|
|
|
+ var year = new Date().getFullYear();
|
|
|
|
+ var num = this.getMonthDays(year + "-" + this.month);
|
|
|
|
+ var list = [];
|
|
|
|
+ for (let i = 0; i < num; i++) {
|
|
|
|
+ list.push({
|
|
|
|
+ label: i + 1 + "号",
|
|
|
|
+ value: i < 10 ? "0" + (i + 1) : i + 1,
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ this.dayList = list || [];
|
|
|
|
+ var a = year + this.month + this.day;
|
|
|
|
+ this.getSearchApply(a);
|
|
|
|
+ },
|
|
|
|
+ getCanActiveApply() {
|
|
|
|
+ var year = new Date().getFullYear();
|
|
|
|
+ var a = year + "" + this.month + "" + this.day;
|
|
|
|
+ this.getSearchApply(a);
|
|
|
|
+ },
|
|
|
|
+ getSearchApply(i) {
|
|
|
|
+ this.monthApplyIndex = "";
|
|
|
|
+ this.$api
|
|
|
|
+ .obtainsystemsubscribesessiondata(i)
|
|
|
|
+ .then((res) => {
|
|
|
|
+ this.monthApplyList = res.data;
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.monthApplyList = [];
|
|
|
|
+ });
|
|
|
|
+ },
|
|
//详情
|
|
//详情
|
|
details(v) {
|
|
details(v) {
|
|
const jump = () => {
|
|
const jump = () => {
|
|
@@ -427,8 +537,25 @@ export default {
|
|
};
|
|
};
|
|
this.$refs.tableList.clearMoreActive()
|
|
this.$refs.tableList.clearMoreActive()
|
|
}
|
|
}
|
|
|
|
+ var data = JSON.parse(JSON.stringify(this.formData));
|
|
|
|
+ if (this.month) {
|
|
|
|
+ var year = new Date().getFullYear();
|
|
|
|
+ var a = year + "" + this.month;
|
|
|
|
+ if (this.day) {
|
|
|
|
+ a = year + "" + this.month + "" + this.day;
|
|
|
|
+ }
|
|
|
|
+ data.ApplyDateTime = a;
|
|
|
|
+ }
|
|
|
|
+ if (this.monthApplyIndex === 0 || this.monthApplyIndex > 0) {
|
|
|
|
+ data.applySiteExamTime =
|
|
|
|
+ this.monthApplyList[this.monthApplyIndex].examTime;
|
|
|
|
+ data.applySiteStartTime =
|
|
|
|
+ this.monthApplyList[this.monthApplyIndex].examStartTime;
|
|
|
|
+ data.applySiteEndTime =
|
|
|
|
+ this.monthApplyList[this.monthApplyIndex].examEndTime;
|
|
|
|
+ }
|
|
this.$api
|
|
this.$api
|
|
- .appuserdangAnList(this.formData)
|
|
|
|
|
|
+ .appuserdangAnList(data)
|
|
.then((res) => {
|
|
.then((res) => {
|
|
this.tableData = res.rows;
|
|
this.tableData = res.rows;
|
|
this.total = res.total;
|
|
this.total = res.total;
|
|
@@ -439,6 +566,8 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
init() {
|
|
init() {
|
|
|
|
+ this.month = "";
|
|
|
|
+ this.monthApplyIndex = "";
|
|
this.search(2);
|
|
this.search(2);
|
|
},
|
|
},
|
|
handleSizeChange(v) {
|
|
handleSizeChange(v) {
|