|
@@ -0,0 +1,169 @@
|
|
|
+<template>
|
|
|
+ <div class="app-container">
|
|
|
+ <!-- 搜索模块 -->
|
|
|
+ <div class="filter-container">
|
|
|
+ <span style="margin-left: 10px;">
|
|
|
+ <span>{{$t("statisticalAnalysis.searchForm.agvAvailability.statisticalDate")}}:</span>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="queryParams.model.statisticalDate"
|
|
|
+ type="datetime"
|
|
|
+ format="yyyy-MM"
|
|
|
+ value-format="yyyy-MM"
|
|
|
+ style="width: 20%;"
|
|
|
+ />
|
|
|
+ </span>
|
|
|
+ <span style="margin-left: 10px;">
|
|
|
+ <el-button plain type="primary" icon="el-icon-search" size="medium" @click="search">
|
|
|
+ {{ $t("table.search") }}
|
|
|
+ </el-button>
|
|
|
+ <el-button plain type="warning" icon="el-icon-refresh" size="medium" @click="reset">
|
|
|
+ {{ $t("table.reset") }}
|
|
|
+ </el-button>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <!-- 列表数据 -->
|
|
|
+ <el-table
|
|
|
+ :key="tableKey"
|
|
|
+ ref="table"
|
|
|
+ v-loading="loading"
|
|
|
+ :data="tableData.records"
|
|
|
+ border
|
|
|
+ fit
|
|
|
+ row-key="id"
|
|
|
+ style="width: 100%;margin-top:50px;"
|
|
|
+ >
|
|
|
+ <!-- 序号 -->
|
|
|
+ <el-table-column :label='$t("common.serialNo")' width="55px" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{scope.$index+(queryParams.current - 1) * queryParams.size + 1}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="productionlineName" :label='$t("statisticalAnalysis.table.operatorPerformance.productLine")' :show-overflow-tooltip="true"></el-table-column>
|
|
|
+ <el-table-column prop="statisticalHours" :label='$t("statisticalAnalysis.table.operatorPerformance.statisticalHours")' :show-overflow-tooltip="true"></el-table-column>
|
|
|
+ <el-table-column prop="statisticalDate" :label='$t("statisticalAnalysis.table.operatorPerformance.statisticalDate")' :show-overflow-tooltip="true"></el-table-column>
|
|
|
+ <!--操作-->
|
|
|
+ <el-table-column
|
|
|
+ :label="$t('table.operation')"
|
|
|
+ fixed="right"
|
|
|
+ align="center"
|
|
|
+ column-key="operation"
|
|
|
+ width="260px"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <a
|
|
|
+ class="rowBtn"
|
|
|
+ @click="queryOperatorPerformance(row)"
|
|
|
+ >查看人员工时详情</a>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <pagination
|
|
|
+ v-show="tableData.total > 0"
|
|
|
+ :limit.sync="queryParams.size"
|
|
|
+ :page.sync="queryParams.current"
|
|
|
+ :total="Number(tableData.total)"
|
|
|
+ @pagination="fetch"
|
|
|
+ />
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="operatorPerformanceVisible"
|
|
|
+ width="80%"
|
|
|
+ custom-class="dialogNoTop"
|
|
|
+ @close="editOperatorPerformanceClose"
|
|
|
+ >
|
|
|
+ <!--【用户工时月统计组件】 -->
|
|
|
+ <OperatorDetailPerformance
|
|
|
+ :row-data="rowData"
|
|
|
+ :productionline-id="productionlineId"
|
|
|
+ :statistical-date="statisticalDate"
|
|
|
+ @close="editOperatorPerformanceClose"
|
|
|
+ @success="editOperatorPerformanceSuccess"
|
|
|
+ />
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ // 【分页】组件
|
|
|
+ import Pagination from "@/components/Pagination"
|
|
|
+ // 【产线工时管理】-API
|
|
|
+ import productlineAvailabilityApi from "@/api/statisticalAnalysis/productlineAvailability"
|
|
|
+ import OperatorDetailPerformance from "@/views/zuihou/statisticalAnalysis/operatorDetailPerformance/Index"
|
|
|
+ // 共通函数
|
|
|
+ import {initQueryParams } from '@/utils/commons'
|
|
|
+
|
|
|
+ export default {
|
|
|
+ name: "agvAvailability",
|
|
|
+ directives: { },
|
|
|
+ components: { Pagination,OperatorDetailPerformance },
|
|
|
+ props: {
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ testRow: {"productionlineId":1,"statisticalDate":"2021-12"},
|
|
|
+ rowData: {},
|
|
|
+ productionlineId:'',
|
|
|
+ statisticalDate:'',
|
|
|
+ tableKey: 0,
|
|
|
+ operatorPerformanceVisible: false,
|
|
|
+ queryParams: initQueryParams({}),
|
|
|
+ loading: false,
|
|
|
+ tableData: {
|
|
|
+ total: 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
|
|
|
+ created() {
|
|
|
+ // 加载列表数据
|
|
|
+ this.fetch()
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ currentUser () {
|
|
|
+ return this.$store.state.account.user
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ search () {
|
|
|
+ this.fetch({
|
|
|
+ ...this.queryParams
|
|
|
+ })
|
|
|
+ },
|
|
|
+ reset () {
|
|
|
+ this.queryParams = initQueryParams({})
|
|
|
+ this.$refs.table.clearSort()
|
|
|
+ this.$refs.table.clearFilter()
|
|
|
+ this.search()
|
|
|
+ },
|
|
|
+ fetch (params = {}) {
|
|
|
+ this.loading = true
|
|
|
+ this.queryParams.current = params.current ? params.current : this.queryParams.current
|
|
|
+ this.queryParams.size = params.size ? params.size : this.queryParams.size
|
|
|
+ productlineAvailabilityApi.getList(this.queryParams).then(response => {
|
|
|
+ const res = response.data
|
|
|
+ if (res.isSuccess) {
|
|
|
+ this.tableData = res.data
|
|
|
+ }
|
|
|
+ }).finally(() => this.loading = false)
|
|
|
+ },
|
|
|
+ //【设备维保记录】按钮-事件
|
|
|
+ queryOperatorPerformance(row){
|
|
|
+ this.productionlineId = row.productionlineId
|
|
|
+ this.statisticalDate = row.statisticalDate
|
|
|
+ this.rowData = row;
|
|
|
+ this.operatorPerformanceVisible = true
|
|
|
+ },
|
|
|
+ editOperatorPerformanceClose(){
|
|
|
+ this.operatorPerformanceVisible = false
|
|
|
+ this.search()
|
|
|
+ },
|
|
|
+ editOperatorPerformanceSuccess(){
|
|
|
+ this.search()
|
|
|
+ },
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped></style>
|