|
@@ -18,7 +18,7 @@
|
|
|
天
|
|
|
</el-form-item>
|
|
|
<el-form-item label="每日正常工作时长" prop="allday">
|
|
|
- <el-select v-model="timeType.allday" placeholder="请选择工作时长" style="width:120px;" @change="timeChange">
|
|
|
+ <el-select v-model="timeType.allday" placeholder="请选择工作时长" style="width:120px;" @change="timeAlldayChange">
|
|
|
<el-option v-for="item in times" :key="item" :label="item.toFixed(1)" :value="item"></el-option>
|
|
|
</el-select>
|
|
|
小时
|
|
@@ -29,7 +29,9 @@
|
|
|
<i class="el-icon-question" style="color:#606266"></i>
|
|
|
</el-tooltip>
|
|
|
<span style="margin-left:25px">填报时长上限</span>
|
|
|
- <el-input :disabled="timeType.lockWorktime" :min="timeType.allday" v-model="timeType.maxReportTime" type="number" style="width:120px;margin-left:10px"></el-input><span style="margin-left:5px;color:#409eff">小时</span>
|
|
|
+ <el-select :disabled="timeType.lockWorktime" v-model="timeType.maxReportTime" type="number" style="width:120px;margin-left:10px">
|
|
|
+ <el-option v-for="item in maxReportTimeRange" :key="item" :label="item.toFixed(1)" :value="item"></el-option>
|
|
|
+ </el-select><span style="margin-left:5px;color:#409eff">小时</span>
|
|
|
</span>
|
|
|
|
|
|
</el-form-item><br>
|
|
@@ -488,6 +490,7 @@
|
|
|
children: 'children',
|
|
|
label: 'label'
|
|
|
},
|
|
|
+ maxReportTimeRange: []
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -496,8 +499,18 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ timeAlldayChange(){
|
|
|
+ if(this.timeType.maxReportTime < this.timeType.allday || this.timeType.lockWorktime){
|
|
|
+ this.timeType.maxReportTime = this.timeType.allday
|
|
|
+ }
|
|
|
+ this.maxReportTimeRange = []
|
|
|
+ for(let i=this.timeType.allday; i<=24; i+=0.5){
|
|
|
+ this.maxReportTimeRange.push(i)
|
|
|
+ }
|
|
|
+ this.timeChange()
|
|
|
+ },
|
|
|
lockChange(){
|
|
|
- console.log('lockChange',this.timeType.maxReportTime);
|
|
|
+ // console.log('lockChange',this.timeType.maxReportTime);
|
|
|
if(this.timeType.lockWorktime){
|
|
|
this.timeType.maxReportTime = this.timeType.allday
|
|
|
}
|
|
@@ -1007,6 +1020,12 @@
|
|
|
this.timeType.customDataMaxValue = this.timeType.customDataMaxValue ? this.timeType.customDataMaxValue : 100
|
|
|
this.timeType.reportAutoApproveDays = this.timeType.reportAutoApproveDays ? this.timeType.reportAutoApproveDays : 1
|
|
|
this.timeChange();
|
|
|
+
|
|
|
+ this.maxReportTimeRange = [] // 填报时长上限
|
|
|
+ for(let i=this.timeType.allday; i<=24; i+=0.5){
|
|
|
+ this.maxReportTimeRange.push(i)
|
|
|
+ }
|
|
|
+
|
|
|
let userlist = res.data.userList
|
|
|
this.whiteList = []
|
|
|
for(let i in userlist){
|