|
|
@@ -360,8 +360,8 @@
|
|
|
>
|
|
|
<template slot-scope="r">
|
|
|
<span>
|
|
|
- <i class="circle" :style="statusColor(r.row.status,true)" />
|
|
|
- <label :style="statusColor(r.row.status,false)">
|
|
|
+ <i class="circle" :style="statusColor(r.row.status, true)" />
|
|
|
+ <label :style="statusColor(r.row.status, false)">
|
|
|
{{
|
|
|
getLabel(dict.type.resumption_status, r.row.status)
|
|
|
}}</label
|
|
|
@@ -383,13 +383,13 @@
|
|
|
<el-button
|
|
|
type="text"
|
|
|
@click="showDetail(r.row)"
|
|
|
- v-show="r.row.status != 2 || r.row.status != 3"
|
|
|
+ v-show="r.row.status == 2 || r.row.status == 3"
|
|
|
>查看</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
type="text"
|
|
|
@click="showscanRecord(r.row)"
|
|
|
- v-show="r.row.status != 2 || r.row.status != 3"
|
|
|
+ v-show="r.row.status == 2 || r.row.status == 3"
|
|
|
>扫描记录</el-button
|
|
|
>
|
|
|
</template>
|
|
|
@@ -753,29 +753,29 @@ export default {
|
|
|
if (this.queryParams.executeCycle == 3) {
|
|
|
if (!this.week) this.week = new Date();
|
|
|
|
|
|
- let oneDayLong = 24 * 60 * 60 * 1000;
|
|
|
- let c_day = this.week.getDay();
|
|
|
- let monday = this.week - (c_day == 0 ? 6 : c_day - 1) * oneDayLong;
|
|
|
- let sunday = this.week + (c_day == 0 ? 0 : 7 - c_day) * oneDayLong;
|
|
|
-
|
|
|
- this.weekStart = `${monday.getYear()}-${monday.getMonth()}-${monday.getDate()}`;
|
|
|
- this.weekEnd = `${sunday.getYear()}-${sunday.getMonth()}-${sunday.getDate()}`;
|
|
|
- // this.weekChanged();
|
|
|
+ this.updateWeekDateRange(this.week);
|
|
|
}
|
|
|
this.resetRangeParam();
|
|
|
this.loadPlanList();
|
|
|
this.loadRoles();
|
|
|
},
|
|
|
-
|
|
|
weekChanged() {
|
|
|
- var date = this.$moment(this.week).isoWeekday(1);
|
|
|
- this.weekStart = date.weekday(1).format("YYYY-MM-DD");
|
|
|
- this.weekEnd = date.weekday(7).format("YYYY-MM-DD");
|
|
|
+ this.updateWeekDateRange(this.week);
|
|
|
this.resetRangeParam();
|
|
|
},
|
|
|
monthChanged() {
|
|
|
this.resetRangeParam();
|
|
|
},
|
|
|
+ updateWeekDateRange(week) {
|
|
|
+ let oneDayLong = 24 * 60 * 60 * 1000;
|
|
|
+ let c_day = week.getDay();
|
|
|
+ this.weekStart = new Date(
|
|
|
+ week.valueOf() - (c_day == 0 ? 6 : c_day - 1) * oneDayLong
|
|
|
+ );
|
|
|
+ this.weekEnd = new Date(
|
|
|
+ week.valueOf() + (c_day == 0 ? 0 : 7 - c_day) * oneDayLong
|
|
|
+ );
|
|
|
+ },
|
|
|
async resetRangeParam() {
|
|
|
if (this.queryParams.executeCycle == 5) {
|
|
|
let yearSval = this.yearS.getFullYear();
|
|
|
@@ -959,10 +959,7 @@ export default {
|
|
|
this.queryParams.range = [new Date(sMDate), new Date(eMData)];
|
|
|
}
|
|
|
} else if (this.queryParams.executeCycle == 3) {
|
|
|
- this.queryParams.range = [
|
|
|
- new Date(this.weekStart),
|
|
|
- new Date(this.weekEnd),
|
|
|
- ];
|
|
|
+ this.queryParams.range = [this.weekStart, this.weekEnd];
|
|
|
} else if (
|
|
|
this.queryParams.executeCycle === 1 ||
|
|
|
this.queryParams.executeCycle == 2
|
|
|
@@ -970,7 +967,7 @@ export default {
|
|
|
this.queryParams.range = this.$dateRange.before(0);
|
|
|
}
|
|
|
},
|
|
|
- statusColor(status,isBackground) {
|
|
|
+ statusColor(status, isBackground) {
|
|
|
let color = "";
|
|
|
switch (status) {
|
|
|
case "1":
|
|
|
@@ -987,12 +984,11 @@ export default {
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
- if(isBackground){
|
|
|
+ if (isBackground) {
|
|
|
return "background-color:" + color;
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
return "color:" + color;
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
},
|
|
|
async mounted() {
|