| | |
| | | format="yyyy-MM" |
| | | value-format="yyyy-MM" |
| | | placeholder="选择月" size="small" style="width: 100%;" |
| | | :clearable="false"> |
| | | :clearable="false" |
| | | @change="refreshTable()"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | |
| | | <el-button size="small" type="primary" @click="refreshTable()">查 询</el-button> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <el-button size="small" type="primary" @click="handleDown" v-show="currentTable == 'value0'">导 出</el-button> |
| | | <el-button size="small" type="primary" @click="handleUp" v-show="currentTable == 'value1'">导 入</el-button> |
| | | <el-button size="small" type="primary" @click="handleDown" v-show="currentTable == 'value0'" :loading="outLoading">导 出</el-button> |
| | | <el-button size="small" type="primary" @click="handleUp" v-show="currentTable == 'value1'">导 入</el-button> |
| | | </div> |
| | | </div> |
| | | <el-radio-group v-model="currentTable" size="small" :key="'111'" style="margin-top: 10px;"> |
| | |
| | | <ValueTable ref="ValueTable0" |
| | | v-if="currentTable == 'value0'" |
| | | :url="$api.auxiliaryOriginalHours.selectAuxiliaryOriginalHours" |
| | | :componentData="componentData" :downUrl="$api.auxiliaryWorkingHours.selectAuxiliaryWorkingHours" :key="upIndex" /> |
| | | :componentData="componentData" :key="upIndex" /> |
| | | <ValueTable ref="ValueTable1" |
| | | v-if="currentTable == 'value1'" |
| | | :url="$api.auxiliaryCorrectionHours.selectAuxiliaryCorrectionHours" |
| | |
| | | upIndex1:100, |
| | | weekList:[], |
| | | personList:[], |
| | | currentTable:'value0' |
| | | currentTable:'value0', |
| | | outLoading:false |
| | | } |
| | | }, |
| | | mounted(){ |
| | |
| | | }) |
| | | }, |
| | | handleDown(){ |
| | | this.$refs.ValueTable0.downFile(false) |
| | | // this.$refs.ValueTable0.downFile(false) |
| | | let entity = {...this.entity} |
| | | entity.month = entity.month.split('-')[0]+'-'+entity.month.split('-')[1] |
| | | this.outLoading = true |
| | | this.$axios.get(this.$api.auxiliaryOriginalHours.exportOriginalHours,{ |
| | | params:entity, |
| | | },{responseType: "blob"}).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('导出成功') |
| | | const blob = new Blob([res],{ type: 'application/octet-stream' }); |
| | | console.log(blob) |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = entity.month+'工时统计表.xlsx'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | handleUp(){ |
| | | this.$refs.ValueTable1.openUpload() |