| | |
| | | </el-radio-group> |
| | | <div style="display: flex;align-items: center;"> |
| | | <p style="font-size: 14px;margin-right: 30px;"> |
| | | 总工时汇总:<span style="font-size: 16px;color: #3A7BFA;">{{ (totalInfo['产量工时汇总']+totalInfo['辅助工时汇总'])? (totalInfo['产量工时汇总']+totalInfo['辅助工时汇总']):0 }}</span> 产量工时汇总:<span style="font-size: 16px;color: #3A7BFA;">{{totalInfo['产量工时汇总']?totalInfo['产量工时汇总']:0}}</span> 辅助工时汇总:<span style="font-size: 16px;color: #3A7BFA;">{{totalInfo['辅助工时汇总']?totalInfo['辅助工时汇总']:0}}</span> |
| | | 总工时汇总:<span style="font-size: 16px;color: #3A7BFA;" v-if="totalInfo">{{ (totalInfo['产量工时汇总']+totalInfo['辅助工时汇总'])? (totalInfo['产量工时汇总']+totalInfo['辅助工时汇总']):0 }}</span> 产量工时汇总:<span style="font-size: 16px;color: #3A7BFA;" v-if="totalInfo">{{totalInfo['产量工时汇总']?totalInfo['产量工时汇总']:0}}</span> 辅助工时汇总:<span style="font-size: 16px;color: #3A7BFA;" v-if="totalInfo">{{totalInfo['辅助工时汇总']?totalInfo['辅助工时汇总']:0}}</span> |
| | | </p> |
| | | <el-button size="small" type="primary" style="margin-right: 16px;" @click="openAdd" v-show="currentTable == 'ValueTable0'">录入数据</el-button> |
| | | <el-button size="small" type="primary" @click="handleOut" :loading="outLoading">导 出</el-button> |
| | | <el-button size="small" type="primary" style="margin-right: 16px;" @click="openAdd" v-show="currentTable == 'ValueTable0'&&add">录入数据</el-button> |
| | | <el-button size="small" type="primary" |
| | | v-if="down" |
| | | @click="handleOut" :loading="outLoading">导 出</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | |
| | | data () { |
| | | return{ |
| | | entity:{}, |
| | | down:false, |
| | | add:false, |
| | | componentData: { |
| | | entity: { |
| | | week: null, |
| | |
| | | requiredAdd: [], |
| | | requiredUp: [] |
| | | }, |
| | | addFileVisible:false, |
| | | entityCopy1: {}, |
| | | upIndex1:100, |
| | | weekList:[ |
| | |
| | | label:'已批准' |
| | | }, |
| | | ], |
| | | totalInfo:{}, |
| | | totalInfo:null, |
| | | auxiliaryWorking:null, |
| | | outLoading:false |
| | | } |
| | |
| | | this.componentData.selectField.weekDay.select = this.weekList |
| | | }, |
| | | methods:{ |
| | | getPower(){ |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let del = false |
| | | let down = false |
| | | let add = false |
| | | let up = false |
| | | let check = false |
| | | let ratify = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'exportWorkingHours') { |
| | | down = true |
| | | } |
| | | if (power[i].menuMethod == 'deleteAuxiliaryWorkingHoursDay') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'insertAuxiliaryWorkingHoursDay') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'updateAuxiliaryWorkingHoursDay') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'check') { |
| | | check = true |
| | | } |
| | | if (power[i].menuMethod == 'approve') { |
| | | ratify = true |
| | | } |
| | | } |
| | | if (!approve) { |
| | | this.componentData.do.splice(3, 1) |
| | | } |
| | | if (!check) { |
| | | this.componentData.do.splice(2, 1) |
| | | } |
| | | if (!up) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.down = down |
| | | this.add = add |
| | | }, |
| | | getYearAndMonthAndDays(date){ |
| | | return getYearAndMonthAndDays(date) |
| | | }, |
| | |
| | | }, |
| | | handleOut(){ |
| | | this.outLoading = true |
| | | this.$axios.post(this.$api.auxiliaryOutputWorkingHours.exportWorkingHours,{responseType: "blob"}).then(res => { |
| | | this.$axios.get(this.$api.auxiliaryOutputWorkingHours.exportWorkingHours,{responseType: "blob"}).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('导出成功') |
| | | const blob = new Blob([res.data]); |
| | | const blob = new Blob([res]); |
| | | console.log(blob) |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |