|
@@ -59,6 +59,8 @@
|
|
|
<a @click="handleAdd(record)">提交数据</a>
|
|
|
<a-divider type="vertical" />
|
|
|
<a @click="handleView(record)">查看明细</a>
|
|
|
+ <a-divider type="vertical" />
|
|
|
+ <a @click="doExportDetail(record)">导出</a>
|
|
|
</template>
|
|
|
</span>
|
|
|
</a-table>
|
|
@@ -75,7 +77,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getWeekReport, exportWeekReport, saveWorkHour } from '@/api/report/check-job'
|
|
|
+import { getWeekReport, exportWeekReport, saveWorkHour, exportWeekReportWeek } from '@/api/report/check-job'
|
|
|
import { Chart } from '@antv/g2'
|
|
|
import PrintInCheckJobReportWeek from '@/views/dashboard/modules/PrintInCheckJobReportWeek'
|
|
|
import DetailCheckJobReport from '@/views/dashboard/modules/DetailCheckJobReport'
|
|
@@ -172,8 +174,8 @@ export default {
|
|
|
// 需要将数据分组:总数,完成数
|
|
|
const groupData = []
|
|
|
this.chartsData.forEach(function (data) {
|
|
|
- groupData.push({ name: '标准工时', week: data.week, totalHours: data.totalHours })
|
|
|
- groupData.push({ name: '可用工时', week: data.week, totalHours: data.useHours })
|
|
|
+ groupData.push({ name: '标准工时', week: data.week + '', totalHours: data.totalHours })
|
|
|
+ groupData.push({ name: '可用工时', week: data.week + '', totalHours: data.useHours })
|
|
|
})
|
|
|
this.getCharts('container', groupData)// 调用统计图
|
|
|
})
|
|
@@ -213,6 +215,16 @@ export default {
|
|
|
this.BaseTool.UPLOAD.downLoadExportExcel(file)
|
|
|
})
|
|
|
},
|
|
|
+ doExportDetail (record) {
|
|
|
+ const parameter = {
|
|
|
+ ...this.queryParam,
|
|
|
+ week: record.week,
|
|
|
+ year: record.year
|
|
|
+ }
|
|
|
+ exportWeekReportWeek(parameter).then(file => {
|
|
|
+ this.BaseTool.UPLOAD.downLoadExportExcel(file)
|
|
|
+ })
|
|
|
+ },
|
|
|
handlePrint (record) {
|
|
|
const modal = this.$refs.basePrintModal
|
|
|
this.visible = false
|